Ejemplo n.º 1
0
 public bool Equals(MatrixF other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     for (var i = 0; i < 16; i++)
     {
         if (Math.Abs(Values[i] - other.Values[i]) > 0.0001)
         {
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 2
0
 public bool Equals(MatrixF other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     for (var i = 0; i < 16; i++)
     {
         if (Math.Abs(Values[i] - other.Values[i]) > 0.0001) return false;
     }
     return true;
 }
Ejemplo n.º 3
0
 public bool EquivalentTo(MatrixF other, float delta = 0.0001f)
 {
     for (var i = 0; i < 16; i++)
     {
         if (Math.Abs(Values[i] - other.Values[i]) >= delta) return false;
     }
     return true;
 }
Ejemplo n.º 4
0
 public static MatrixF operator -(MatrixF left, MatrixF right)
 {
     var mat = new MatrixF();
     for (var i = 0; i < 16; i++) mat[i] = left[i] - right[i];
     return mat;
 }