public bool isZero() { for (int i = 0; i < 16; ++i) { if (!NewMath.Equals(M[i], 0)) { return(false); } } return(true); }
public static bool operator ==(matrix4 first, matrix4 other) { for (int i = 0; i < 16; ++i) { if (!NewMath.Equals(first[i], other[i])) { return(false); } } return(true); }
public bool isIdentity() { if (!NewMath.Equals(M[0], 1) || !NewMath.Equals(M[5], 1) || !NewMath.Equals(M[10], 1) || !NewMath.Equals(M[15], 1)) { return(false); } for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { if ((j != i) && (!NewMath.IsZero(M[i * 4 + j]))) { return(false); } } } return(true); }
public static bool operator ==(vector3df first, vector3df other) { return(NewMath.Equals(first.X, other.X) && NewMath.Equals(first.Y, other.Y) && NewMath.Equals(first.Z, other.Z)); }