private static void TestBinaryOperationFloatExact(float a, float b, float expected, BinaryOperationType op) { BinaryOperation func = binaryOperations[(int)op]; sfloat result = func((sfloat)a, (sfloat)b); bool isOk = result.Equals((sfloat)expected); Debug.Assert(isOk); }
private static void TestUnaryOperationFloatExact(float x, float expected, UnaryOperationType op) { UnaryOperation func = unaryOperations[(int)op]; sfloat result = func((sfloat)x); bool isOk = result.Equals((sfloat)expected); Debug.Assert(isOk); }
public bool Equals(Constraint other) { return(ConstrainedAxes.Equals(other.ConstrainedAxes) && Type == other.Type && Min.Equals(other.Min) && Max.Equals(other.Max) && SpringFrequency.Equals(other.SpringFrequency) && SpringDamping.Equals(other.SpringDamping)); }
public bool Equals(FloatRange other) => Min.Equals(other.Min) && Max.Equals(other.Max);