float.GetHashCode()

Here are the examples of the csharp api float.GetHashCode() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

541 Examples 7

19 Source : BssomFloat.cs
with MIT License
from 1996v

public override int GetHashCode()
        {
            switch (FloatType)
            {
                case BssomFloatType.Single:
                    return GetFloat32().GetHashCode();
                default://case BssomFloatType.Double:
                    return GetFloat64().GetHashCode();
            }
        }

19 Source : CylSphere.cs
with GNU Affero General Public License v3.0
from ACEmulator

public override int GetHashCode()
        {
            int hash = 0;

            hash = (hash * 397) ^ Height.GetHashCode();
            hash = (hash * 397) ^ Radius.GetHashCode();
            hash = (hash * 397) ^ LowPoint.GetHashCode();

            return hash;
        }

19 Source : Sphere.cs
with GNU Affero General Public License v3.0
from ACEmulator

public override int GetHashCode()
        {
            int hash = 0;

            hash = (hash * 397) ^ Center.GetHashCode();
            hash = (hash * 397) ^ Radius.GetHashCode();

            return hash;
        }

19 Source : Vector2.cs
with The Unlicense
from aeroson

public override int GetHashCode()
        {
            return X.GetHashCode() + Y.GetHashCode();
        }

19 Source : Vector3.cs
with The Unlicense
from aeroson

public override int GetHashCode()
        {
            return X.GetHashCode() + Y.GetHashCode() + Z.GetHashCode();
        }

19 Source : Vector4.cs
with The Unlicense
from aeroson

public override int GetHashCode()
        {
            return X.GetHashCode() + Y.GetHashCode() + Z.GetHashCode() + W.GetHashCode();
        }

19 Source : Quaternion.cs
with The Unlicense
from aeroson

public override int GetHashCode()
        {
            return Xyz.GetHashCode() ^ W.GetHashCode();
        }

19 Source : Vector2.cs
with The Unlicense
from aeroson

public override int GetHashCode()
        {
            return X.GetHashCode() ^ Y.GetHashCode();
        }

19 Source : Vector2.cs
with MIT License
from aillieo

public override int GetHashCode()
        {
            return this.x.GetHashCode() ^ this.y.GetHashCode() << 2;
        }

19 Source : Shape.cs
with MIT License
from Alan-FGR

public override int GetHashCode()
        {
            unchecked
            {
                int result = Area.GetHashCode();
                result = (result * 397) ^ Centroid.GetHashCode();
                result = (result * 397) ^ Inertia.GetHashCode();
                result = (result * 397) ^ Mreplaced.GetHashCode();
                return result;
            }
        }

19 Source : CurveKey.cs
with MIT License
from Alan-FGR

public override int GetHashCode()
        {
            return position.GetHashCode() ^ value.GetHashCode() ^ tangentIn.GetHashCode() ^
                   tangentOut.GetHashCode() ^ continuity.GetHashCode();
        }

19 Source : ProceduralWorldsGUI.cs
with MIT License
from alelievr

float Slider(GUIContent name, float value, ref float min, ref float max, float step = 0.01f, bool editableMin = true, bool editableMax = true, bool intMode = false, params PWGUIStyle[] styles)
		{
			int		sliderLabelWidth = 30;
			var		e = Event.current;

			foreach (var style in styles)
				if (style.type == PWGUIStyleType.PrefixLabelWidth)
					sliderLabelWidth = style.data;

			if (name == null)
				name = new GUIContent();

			var fieldSettings = GetGUISettingData((intMode) ? PWGUIFieldType.IntSlider : PWGUIFieldType.Slider, () => {
				return new PWGUISettings();
			});
			
			EditorGUILayout.BeginVertical();
			{
				EditorGUILayout.BeginHorizontal();
				{
					EditorGUI.BeginDisabledGroup(!editableMin);
						min = EditorGUILayout.FloatField(min, GUILayout.Width(sliderLabelWidth));
					EditorGUI.EndDisabledGroup();
					
					if (step != 0)
					{
						float m = 1 / step;
						value = Mathf.Round(GUILayout.HorizontalSlider(value, min, max) * m) / m;
					}
					else
						value = GUILayout.HorizontalSlider(value, min, max);
	
					EditorGUI.BeginDisabledGroup(!editableMax);
						max = EditorGUILayout.FloatField(max, GUILayout.Width(sliderLabelWidth));
					EditorGUI.EndDisabledGroup();
				}
				EditorGUILayout.EndHorizontal();
				
				GUILayout.Space(-4);
				EditorGUILayout.BeginHorizontal();
				{
					if (!fieldSettings.editing)
					{
						name.text += value.ToString();
						GUILayout.Label(name, Styles.centeredLabel);
						Rect valueRect = GUILayoutUtility.GetLastRect();
						if (valueRect.Contains(e.mousePosition) && e.type == EventType.MouseDown)
						{
							e.Use();
							if (e.clickCount == 2)
								fieldSettings.editing = true;
						}
					}
					else
					{
						GUI.SetNextControlName("slider-value-" + value.GetHashCode());
						GUILayout.FlexibleSpace();
						value = EditorGUILayout.FloatField(value, GUILayout.Width(50));
						Rect valueRect = GUILayoutUtility.GetLastRect();
						GUILayout.FlexibleSpace();
						if ((!valueRect.Contains(e.mousePosition) && e.type == EventType.MouseDown) || (e.isKey && e.keyCode == KeyCode.Return))
							{ fieldSettings.editing = false; e.Use(); }
						if (e.isKey && e.keyCode == KeyCode.Escape)
							{ fieldSettings.editing = false; e.Use(); }
					}
				}
				EditorGUILayout.EndHorizontal();
			}
			EditorGUILayout.EndVertical();

			return value;
		}

19 Source : BiomeSwitchList.cs
with MIT License
from alelievr

public override int GetHashCode()
		{
			int hash = 59;

			hash = hash * 31 + min.GetHashCode();
			hash = hash * 31 + max.GetHashCode();
			hash = hash * 31 + absoluteMin.GetHashCode();
			hash = hash * 31 + absoluteMax.GetHashCode();
			hash = hash * 31 + samplerName.GetHashCode();

			return hash;
		}

19 Source : GuidelineColor.cs
with MIT License
from AlFasGD

public override int GetHashCode() => col.GetHashCode();

19 Source : AngleLimits.cs
with MIT License
from all-iver

public override int GetHashCode() {
            return (min + max).GetHashCode();
        }

19 Source : CurveKey.cs
with MIT License
from allenwp

public override int GetHashCode()
        {
            return this._position.GetHashCode() ^ this._value.GetHashCode() ^ this._tangentIn.GetHashCode() ^
                this._tangentOut.GetHashCode() ^ this._continuity.GetHashCode();
        }

19 Source : GamePadTriggers.cs
with MIT License
from allenwp

public override int GetHashCode()
        {
            unchecked
            {
                return (Left.GetHashCode() * 397) ^ Right.GetHashCode();
            }
        }

19 Source : BoundingSphere.cs
with MIT License
from allenwp

public override int GetHashCode()
        {
            return this.Center.GetHashCode() + this.Radius.GetHashCode();
        }

19 Source : Plane.cs
with MIT License
from allenwp

public override int GetHashCode()
        {
            return Normal.GetHashCode() ^ D.GetHashCode();
        }

19 Source : Vector2f.cs
with MIT License
from anderm

public override int GetHashCode () {
		return x.GetHashCode () ^ y.GetHashCode () << 2;
	}

19 Source : PlayerInfo.cs
with MIT License
from andruzzzhka

public override int GetHashCode()
        {
            var hashCode = -277278763;
            hashCode = hashCode * -1521134295 + EqualityComparer<Color32>.Default.GetHashCode(playerNameColor);
            hashCode = hashCode * -1521134295 + playerScore.GetHashCode();
            hashCode = hashCode * -1521134295 + playerCutBlocks.GetHashCode();
            hashCode = hashCode * -1521134295 + playerComboBlocks.GetHashCode();
            hashCode = hashCode * -1521134295 + playerTotalBlocks.GetHashCode();
            hashCode = hashCode * -1521134295 + playerEnergy.GetHashCode();
            hashCode = hashCode * -1521134295 + playerProgress.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer<LevelOptionsInfo>.Default.GetHashCode(playerLevelOptions);
            hashCode = hashCode * -1521134295 + fullBodyTracking.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer<Vector3>.Default.GetHashCode(headPos);
            hashCode = hashCode * -1521134295 + EqualityComparer<Vector3>.Default.GetHashCode(rightHandPos);
            hashCode = hashCode * -1521134295 + EqualityComparer<Vector3>.Default.GetHashCode(leftHandPos);
            hashCode = hashCode * -1521134295 + EqualityComparer<Vector3>.Default.GetHashCode(rightLegPos);
            hashCode = hashCode * -1521134295 + EqualityComparer<Vector3>.Default.GetHashCode(leftLegPos);
            hashCode = hashCode * -1521134295 + EqualityComparer<Vector3>.Default.GetHashCode(pelvisPos);
            hashCode = hashCode * -1521134295 + EqualityComparer<Quaternion>.Default.GetHashCode(headRot);
            hashCode = hashCode * -1521134295 + EqualityComparer<Quaternion>.Default.GetHashCode(rightHandRot);
            hashCode = hashCode * -1521134295 + EqualityComparer<Quaternion>.Default.GetHashCode(leftHandRot);
            hashCode = hashCode * -1521134295 + EqualityComparer<Quaternion>.Default.GetHashCode(rightLegRot);
            hashCode = hashCode * -1521134295 + EqualityComparer<Quaternion>.Default.GetHashCode(leftLegRot);
            hashCode = hashCode * -1521134295 + EqualityComparer<Quaternion>.Default.GetHashCode(pelvisRot);
            return hashCode;
        }

19 Source : RoomSettings.cs
with MIT License
from andruzzzhka

public override int GetHashCode()
        {
            var hashCode = -1123100830;
            hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(Name);
            hashCode = hashCode * -1521134295 + UsePreplacedword.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(Preplacedword);
            hashCode = hashCode * -1521134295 + MaxPlayers.GetHashCode();
            hashCode = hashCode * -1521134295 + PerPlayerDifficulty.GetHashCode();
            hashCode = hashCode * -1521134295 + ResultsShowTime.GetHashCode();
            return hashCode;
        }

19 Source : ScrappedSong.cs
with MIT License
from andruzzzhka

public override int GetHashCode()
        {
            var hashCode = 505786036;
            hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(Key);
            hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(Hash);
            hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(SongName);
            hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(SongSubName);
            hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(LevelAuthorName);
            hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(SongAuthorName);
            hashCode = hashCode * -1521134295 + EqualityComparer<List<DifficultyStats>>.Default.GetHashCode(Diffs);
            hashCode = hashCode * -1521134295 + Bpm.GetHashCode();
            hashCode = hashCode * -1521134295 + PlayedCount.GetHashCode();
            hashCode = hashCode * -1521134295 + Upvotes.GetHashCode();
            hashCode = hashCode * -1521134295 + Downvotes.GetHashCode();
            hashCode = hashCode * -1521134295 + Heat.GetHashCode();
            hashCode = hashCode * -1521134295 + Rating.GetHashCode();
            return hashCode;
        }

19 Source : ScrappedSong.cs
with MIT License
from andruzzzhka

public override int GetHashCode()
        {
            var hashCode = 342751480;
            hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(Diff);
            hashCode = hashCode * -1521134295 + Scores.GetHashCode();
            hashCode = hashCode * -1521134295 + Stars.GetHashCode();
            hashCode = hashCode * -1521134295 + Ranked.GetHashCode();
            return hashCode;
        }

19 Source : PlayerInfo.cs
with MIT License
from andruzzzhka

public override int GetHashCode()
        {
            var hashCode = -277278763;
            hashCode = hashCode * -1521134295 + EqualityComparer<Color32>.Default.GetHashCode(playerNameColor);
            hashCode = hashCode * -1521134295 + playerScore.GetHashCode();
            hashCode = hashCode * -1521134295 + playerCutBlocks.GetHashCode();
            hashCode = hashCode * -1521134295 + playerComboBlocks.GetHashCode();
            hashCode = hashCode * -1521134295 + playerTotalBlocks.GetHashCode();
            hashCode = hashCode * -1521134295 + playerEnergy.GetHashCode();
            hashCode = hashCode * -1521134295 + playerProgress.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer<LevelOptionsInfo>.Default.GetHashCode(playerLevelOptions);
            hashCode = hashCode * -1521134295 + fullBodyTracking.GetHashCode();
            return hashCode;
        }

19 Source : EqualizerBand.cs
with MIT License
from angelobreuer

public override int GetHashCode()
    {
        var hashCode = 1089811828;
        hashCode = (hashCode * -1521134295) + Band.GetHashCode();
        hashCode = (hashCode * -1521134295) + Gain.GetHashCode();
        return hashCode;
    }

19 Source : Quaternion.cs
with MIT License
from AnotherEnd15

public override int GetHashCode()
        {
            return this.x.GetHashCode() + this.y.GetHashCode() + this.z.GetHashCode() + this.w.GetHashCode();
        }

19 Source : Vector2.cs
with MIT License
from AnotherEnd15

public override int GetHashCode()
        {
            return this.x.GetHashCode() + this.y.GetHashCode();
        }

19 Source : Vector3.cs
with MIT License
from AnotherEnd15

public override int GetHashCode()
        {
            return this.x.GetHashCode() + this.y.GetHashCode() + this.z.GetHashCode();
        }

19 Source : Plane.cs
with MIT License
from ansel86castro

public override int GetHashCode()
        {
            float d = this.D;
            return (this.Normal.GetHashCode() + d.GetHashCode());
        }

19 Source : Quaternion.cs
with MIT License
from ansel86castro

public override int GetHashCode()
        {
            return (((this.X.GetHashCode() + this.Y.GetHashCode()) + this.Z.GetHashCode()) + this.W.GetHashCode());
        }

19 Source : Vector2.cs
with MIT License
from ansel86castro

public readonly override int GetHashCode()
        {
            return (this.X.GetHashCode() + this.Y.GetHashCode());
        }

19 Source : Vector4.cs
with MIT License
from ansel86castro

public readonly override int GetHashCode()
        {
            return (((this.X.GetHashCode() + this.Y.GetHashCode()) + this.Z.GetHashCode()) + this.W.GetHashCode());
        }

19 Source : Volumes.cs
with MIT License
from ansel86castro

public override int GetHashCode()
        {
            return Center.GetHashCode() + Radius.GetHashCode();
        }

19 Source : PlaneVector.cs
with GNU Lesser General Public License v3.0
from ApexGameTools

public override int GetHashCode()
        {
            return this.x.GetHashCode() ^ this.z.GetHashCode() << 2;
        }

19 Source : HeightNavigationCapabilities.cs
with GNU Lesser General Public License v3.0
from ApexGameTools

public override int GetHashCode()
        {
            return this.maxSlopeAngle.GetHashCode() ^ this.maxClimbHeight.GetHashCode() << 2 ^ this.maxDropHeight.GetHashCode() >> 2;
        }

19 Source : RenderingParameters.cs
with GNU General Public License v3.0
from arklumpus

public override int GetHashCode()
        {
            int hash = 13;

            unchecked
            {
                hash = (hash * 7) + this.Left.GetHashCode();
                hash = (hash * 7) + this.Top.GetHashCode();
                hash = (hash * 7) + this.Width.GetHashCode();
                hash = (hash * 7) + this.Height.GetHashCode();
                hash = (hash * 7) + this.Scale.GetHashCode();
                hash = (hash * 7) + this.RenderWidth.GetHashCode();
                hash = (hash * 7) + this.RenderHeight.GetHashCode();
            }

            return hash;
        }

19 Source : Vector3.cs
with MIT License
from austinvaness

public override int GetHashCode ()
        {
            int hashCode = 373119288;
            hashCode = hashCode * -1521134295 + x.GetHashCode();
            hashCode = hashCode * -1521134295 + y.GetHashCode();
            hashCode = hashCode * -1521134295 + z.GetHashCode();
            return hashCode;
        }

19 Source : JobIgesOutputPayloadAdvanced.cs
with Apache License 2.0
from Autodesk-Forge

public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.Tolerance != null)
                    hash = hash * 59 + this.Tolerance.GetHashCode();
                if (this.SurfaceType != null)
                    hash = hash * 59 + this.SurfaceType.GetHashCode();
                if (this.SheetType != null)
                    hash = hash * 59 + this.SheetType.GetHashCode();
                if (this.SolidType != null)
                    hash = hash * 59 + this.SolidType.GetHashCode();
                return hash;
            }
        }

19 Source : JobStepOutputPayloadAdvanced.cs
with Apache License 2.0
from Autodesk-Forge

public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.ApplicationProtocol != null)
                    hash = hash * 59 + this.ApplicationProtocol.GetHashCode();
                if (this.Tolerance != null)
                    hash = hash * 59 + this.Tolerance.GetHashCode();
                return hash;
            }
        }

19 Source : TextureUnitState.cs
with GNU Lesser General Public License v2.1
from axiom3d

public override int GetHashCode()
        {
            return this.blendType.GetHashCode() ^ this.operation.GetHashCode() ^ this.source1.GetHashCode() ^
                   this.source2.GetHashCode() ^
                   this.colorArg1.GetHashCode() ^ this.colorArg2.GetHashCode() ^ this.alphaArg1.GetHashCode() ^
                   this.alphaArg2.GetHashCode() ^
                   this.blendFactor.GetHashCode();
        }

19 Source : Real.cs
with GNU Lesser General Public License v2.1
from axiom3d

public override int GetHashCode()
        {
            return this._value.GetHashCode();
        }

19 Source : SpriteManager.cs
with GNU Lesser General Public License v2.1
from axiom3d

public override int GetHashCode()
            {
                return Alpha.GetHashCode() ^ Pos.GetHashCode() ^ UV.GetHashCode() ^ TexHandle.GetHashCode();
            }

19 Source : Vector3.cs
with MIT License
from AyrA

public override int GetHashCode()
        {
            return X.GetHashCode() ^ Y.GetHashCode() ^ Z.GetHashCode();
        }

19 Source : Vector4.cs
with MIT License
from AyrA

public override int GetHashCode()
        {
            return W.GetHashCode() ^ X.GetHashCode() ^ Y.GetHashCode() ^ Z.GetHashCode();
        }

19 Source : PdfSize.cs
with MIT License
from azist

public override int GetHashCode()
    {
      var result = this.Width.GetHashCode() ^ this.Height.GetHashCode();
      if (m_Unit != null)
        result ^= m_Unit.GetHashCode();

      return result;
    }

19 Source : PdfUnit.cs
with MIT License
from azist

public override int GetHashCode()
    {
      return m_Name.GetHashCodeOrdSenseCase() ^ m_Points.GetHashCode();
    }

19 Source : Argument.cs
with MIT License
from Bannerlord-Coop-Team

public override int GetHashCode()
        {
            var hash = (int) EventType;
            int? argHash = null;
            switch (EventType)
            {
                case EventArgType.Null:
                    break;
                case EventArgType.MBObjectManager:
                    break;
                case EventArgType.MBObject:
                    argHash = MbGUID.Value.GetHashCode();
                    break;
                case EventArgType.Int:
                    argHash = Int.Value.GetHashCode();
                    break;
                case EventArgType.Float:
                    argHash = Float.Value.GetHashCode();
                    break;
                case EventArgType.StoreObjectId:
                    argHash = StoreObjectId.Value.GetHashCode();
                    break;
                case EventArgType.CurrentCampaign:
                    break;
                case EventArgType.SmallObjectRaw:
                    argHash = Raw.GetHashCode();
                    break;
                default:
                    throw new ArgumentOutOfRangeException();
            }

            if (argHash.HasValue) hash = (hash * 397) ^ argHash.Value;

            return hash;
        }

19 Source : StateTransition.cs
with MIT License
from Baste-RainGames

public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = duration.GetHashCode();
                hashCode = (hashCode * 397) ^ (int) type;
                hashCode = (hashCode * 397) ^ (curve != null ? curve.GetHashCode() : 0);
                return hashCode;
            }
        }

19 Source : Quaternion.cs
with MIT License
from bbepis

public override int GetHashCode()
      {
         return x.GetHashCode() ^ ( y.GetHashCode() << 2 ) ^ ( z.GetHashCode() >> 2 ) ^ ( w.GetHashCode() >> 1 );
      }

See More Examples