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 View Source File : JobIgesOutputPayloadAdvanced.cs
License : Apache License 2.0
Project Creator : 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 View Source File : PdfUnit.cs
License : MIT License
Project Creator : azist

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

19 View Source File : ScrappedSong.cs
License : MIT License
Project Creator : 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 View Source File : PlaneVector.cs
License : GNU Lesser General Public License v3.0
Project Creator : ApexGameTools

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

19 View Source File : Quaternion.cs
License : MIT License
Project Creator : AnotherEnd15

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

19 View Source File : Plane.cs
License : MIT License
Project Creator : allenwp

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

19 View Source File : SpriteManager.cs
License : GNU Lesser General Public License v2.1
Project Creator : axiom3d

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

19 View Source File : CurveKey.cs
License : MIT License
Project Creator : Alan-FGR

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

19 View Source File : Quaternion.cs
License : MIT License
Project Creator : bbepis

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

19 View Source File : BiomeSwitchList.cs
License : MIT License
Project Creator : 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 View Source File : Vector4.cs
License : MIT License
Project Creator : ansel86castro

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

19 View Source File : Vector3.cs
License : MIT License
Project Creator : AnotherEnd15

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

19 View Source File : GamePadTriggers.cs
License : MIT License
Project Creator : allenwp

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

19 View Source File : RenderingParameters.cs
License : GNU General Public License v3.0
Project Creator : 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 View Source File : Vector2.cs
License : MIT License
Project Creator : aillieo

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

19 View Source File : TextureUnitState.cs
License : GNU Lesser General Public License v2.1
Project Creator : 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 View Source File : PlayerInfo.cs
License : MIT License
Project Creator : 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 View Source File : Vector4.cs
License : MIT License
Project Creator : AyrA

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

19 View Source File : Vector3.cs
License : The Unlicense
Project Creator : aeroson

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

19 View Source File : StateTransition.cs
License : MIT License
Project Creator : 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 View Source File : PlayerInfo.cs
License : MIT License
Project Creator : 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 View Source File : EqualizerBand.cs
License : MIT License
Project Creator : angelobreuer

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

19 View Source File : Vector4.cs
License : The Unlicense
Project Creator : aeroson

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

19 View Source File : Vector2.cs
License : MIT License
Project Creator : AnotherEnd15

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

19 View Source File : GuidelineColor.cs
License : MIT License
Project Creator : AlFasGD

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

19 View Source File : Vector2.cs
License : MIT License
Project Creator : ansel86castro

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

19 View Source File : Plane.cs
License : MIT License
Project Creator : ansel86castro

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

19 View Source File : CurveKey.cs
License : MIT License
Project Creator : allenwp

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

19 View Source File : Volumes.cs
License : MIT License
Project Creator : ansel86castro

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

19 View Source File : Vector2.cs
License : The Unlicense
Project Creator : aeroson

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

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

19 View Source File : BoundingSphere.cs
License : MIT License
Project Creator : allenwp

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

19 View Source File : Vector3.cs
License : MIT License
Project Creator : 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 View Source File : Vector2.cs
License : The Unlicense
Project Creator : aeroson

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

19 View Source File : JobStepOutputPayloadAdvanced.cs
License : Apache License 2.0
Project Creator : 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 View Source File : Vector2f.cs
License : MIT License
Project Creator : anderm

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

19 View Source File : Real.cs
License : GNU Lesser General Public License v2.1
Project Creator : axiom3d

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

19 View Source File : Shape.cs
License : MIT License
Project Creator : 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 View Source File : Vector3.cs
License : MIT License
Project Creator : AyrA

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

19 View Source File : RoomSettings.cs
License : MIT License
Project Creator : 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 View Source File : PdfSize.cs
License : MIT License
Project Creator : azist

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

      return result;
    }

19 View Source File : CylSphere.cs
License : GNU Affero General Public License v3.0
Project Creator : 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 View Source File : Argument.cs
License : MIT License
Project Creator : 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 View Source File : ScrappedSong.cs
License : MIT License
Project Creator : 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 View Source File : ProceduralWorldsGUI.cs
License : MIT License
Project Creator : 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 View Source File : BssomFloat.cs
License : MIT License
Project Creator : 1996v

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

19 View Source File : Sphere.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

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

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

            return hash;
        }

19 View Source File : Quaternion.cs
License : The Unlicense
Project Creator : aeroson

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

19 View Source File : AngleLimits.cs
License : MIT License
Project Creator : all-iver

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

19 View Source File : Quaternion.cs
License : MIT License
Project Creator : ansel86castro

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

See More Examples