/// <summary> /// Returns the hash code for this instance. /// </summary> /// <returns>A 32-bit signed integer hash code.</returns> public override int GetHashCode() { return(MinX.GetHashCode() ^ MaxX.GetHashCode() ^ MinY.GetHashCode() ^ MaxY.GetHashCode() ^ MinZ.GetHashCode() ^ MaxZ.GetHashCode()); }
public override int GetHashCode() { unchecked { int hashCode = Center.GetHashCode(); hashCode = (hashCode * 397) ^ RadiusX.GetHashCode(); hashCode = (hashCode * 397) ^ RadiusY.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { int hashCode = TopLeft.GetHashCode(); hashCode = (hashCode * 397) ^ Width.GetHashCode(); hashCode = (hashCode * 397) ^ Height.GetHashCode(); return(hashCode); } }
private static int GetIdentityHashCode() { // This code is called only once. Float zero = 0; Float one = 1; // return zero.GetHashCode() ^ zero.GetHashCode() ^ zero.GetHashCode() ^ one.GetHashCode(); // But this expression can be simplified because the first two hash codes cancel. return(zero.GetHashCode() ^ one.GetHashCode()); }
internal Value(System.Single value, Parameterization p = Parameterization.Value) : base(value) { Original = value; _clrType = typeof(System.Single); _hashCode = GetCrossTypeHashCode(_clrType, value.GetHashCode()); Build = (buildContext, buildArgs) => { return((p != Parameterization.None) ? (value.Parameterize(buildContext, p) ?? Mapping.BuildCast(value)) : Mapping.BuildCast(value)); }; }
static StackObject *GetHashCode_4(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Single instance_of_this_method = GetInstance(__domain, ptr_of_this_method, __mStack); var result_of_this_method = instance_of_this_method.GetHashCode(); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method; return(__ret + 1); }
/// <summary> /// Returns the hash code for this instance. /// </summary> /// <returns>A 32-bit signed integer hash code.</returns> public override int GetHashCode() { return(Mode.GetHashCode() ^ Mu.GetHashCode() ^ Mu2.GetHashCode() ^ Rho.GetHashCode() ^ Rho2.GetHashCode() ^ RhoN.GetHashCode() ^ Bounce.GetHashCode() ^ BounceVelocity.GetHashCode() ^ SoftErp.GetHashCode() ^ SoftCfm.GetHashCode() ^ Motion1.GetHashCode() ^ Motion2.GetHashCode() ^ MotionN.GetHashCode() ^ Slip1.GetHashCode() ^ Slip2.GetHashCode()); }
/// <summary> /// Gets the Measure object hash code /// </summary> /// <returns>Hash code of this object</returns> public override int GetHashCode() { return(mAmount.GetHashCode()); }
/// <summary> /// /// </summary> /// <returns></returns> public override int GetHashCode() { return(x.GetHashCode() ^ y.GetHashCode() ^ z.GetHashCode()); }
public override int GetHashCode() { return((X.GetHashCode()) ^ (Y.GetHashCode() << 2) ^ (Z.GetHashCode() >> 2)); }
public override int GetHashCode() { return(Normal.GetHashCode() ^ D.GetHashCode()); }
public virtual bool runTest() { int iCountErrors = 0; int iCountTestcases = 0; System.String strCheckpoint = "CHECKPOINT"; System.Console.Out.Write(strName); System.Console.Out.Write(": "); System.Console.Out.Write(s_strTFName); System.Console.Out.WriteLine(" runTest started..."); System.Single wrSingle = (1.0f); iCountTestcases++; System.Console.Out.WriteLine("GetHashCode: Verify Single object hash code"); if (wrSingle.GetHashCode() != GetExpectedHashCode(wrSingle)) { System.Console.Error.Write("GetHashCode error: "); System.Console.Error.Write("Expected Result = <"); System.Console.Error.Write(Math.Abs((int)wrSingle)); System.Console.Error.Write("> "); System.Console.Error.Write("Returned Result = <"); System.Console.Error.Write(wrSingle.GetHashCode()); System.Console.Error.Write("> "); iCountErrors |= 0x01; } wrSingle = Single.Epsilon; iCountTestcases++; if (wrSingle.GetHashCode() != GetExpectedHashCode(wrSingle)) { System.Console.Error.Write("GetHashCode error: "); System.Console.Error.Write("Expected Result = <"); System.Console.Error.Write(Math.Abs((int)wrSingle)); System.Console.Error.Write("> "); System.Console.Error.Write("Returned Result = <"); System.Console.Error.Write(wrSingle.GetHashCode()); System.Console.Error.Write("> "); iCountErrors |= 0x01; } wrSingle = Single.NaN; iCountTestcases++; if (wrSingle.GetHashCode() != GetExpectedHashCode(wrSingle)) { System.Console.Error.Write("GetHashCode error: "); System.Console.Error.Write("Expected Result = <"); System.Console.Error.Write(Math.Abs((int)wrSingle)); System.Console.Error.Write("> "); System.Console.Error.Write("Returned Result = <"); System.Console.Error.Write(wrSingle.GetHashCode()); System.Console.Error.Write("> "); iCountErrors |= 0x01; } System.Console.Error.Write(strName); System.Console.Error.Write(": "); System.Console.Error.Write(s_strTFName); System.Console.Error.Write(" "); System.Console.Error.Write("iCountErrors=="); System.Console.Error.WriteLine(iCountErrors); if (iCountErrors == 0) { Console.WriteLine("paSs. " + s_strTFName + " ,iCountTestcases==" + iCountTestcases.ToString()); return(true); } else { Console.WriteLine("FAiL! " + s_strTFName + " ,iCountErrors==" + iCountErrors.ToString()); return(false); } }
/// <summary> /// Returns the hash code for this instance. /// </summary> /// <returns>A 32-bit signed integer hash code.</returns> public override int GetHashCode() { return(X.GetHashCode() ^ Y.GetHashCode() ^ Z.GetHashCode() ^ W.GetHashCode()); }
public override int GetHashCode() { return(X.GetHashCode() + Y.GetHashCode()); }
public override int GetHashCode() { return(HashCoder.GetHash(Size.GetHashCode(), Name.GetHashCode(), ((int)Style).GetHashCode())); }
/// <summary> /// Returns the hash code for this instance. /// </summary> /// <returns>A 32-bit signed integer hash code.</returns> public override int GetHashCode() { return(TotalMass.GetHashCode() ^ Center.GetHashCode() ^ Inertia.GetHashCode()); }