Esempio n. 1
0
 public bool Equals(Sphere other)
 {
     return(
         Mathx.IsEqual(centre, other.centre) &&
         Mathx.IsEqual(radius, other.radius)
         );
 }
Esempio n. 2
0
 public bool Equals(Ellipse other)
 {
     return(
         Mathx.IsEqual(centre, other.centre) &&
         Mathx.IsEqual(extents, other.extents)
         );
 }
Esempio n. 3
0
 public bool Equals(Line other)
 {
     return(
         Mathx.IsEqual(v0, other.v0) &&
         Mathx.IsEqual(v1, other.v1)
         );
 }
Esempio n. 4
0
 public bool Equals(LinearEquation other)
 {
     return(
         Mathx.IsEqual(this.a, other.a) &&
         Mathx.IsEqual(this.b, other.b)
         );
 }
Esempio n. 5
0
 public bool Equals(Range3Int other)
 {
     return(
         Mathx.IsEqual(min, other.min) &&
         Mathx.IsEqual(max, other.max)
         );
 }
Esempio n. 6
0
 public bool Equals(Equation1 other)
 {
     return(
         Mathx.IsEqual(this.x, other.x) &&
         Mathx.IsEqual(this.y, other.y)
         );
 }
Esempio n. 7
0
 public bool Equals(Triangle other)
 {
     return(
         Mathx.IsEqual(v0, other.v0) &&
         Mathx.IsEqual(v1, other.v1) &&
         Mathx.IsEqual(v2, other.v2)
         );
 }
Esempio n. 8
0
 public bool Equals(QuadraticEquation other)
 {
     return(
         Mathx.IsEqual(this.a, other.a) &&
         Mathx.IsEqual(this.b, other.b) &&
         Mathx.IsEqual(this.c, other.c)
         );
 }
Esempio n. 9
0
        public static bool Contains(Vector3 v0, Vector3 v1, Vector3 p)
        {
            float v0v1 = (v1 - v0).sqrMagnitude;
            float v0p  = (p - v0).sqrMagnitude;
            float pv1  = (v1 - p).sqrMagnitude;

            return(Mathx.IsEqual(v0v1, v0p + pv1));
        }
Esempio n. 10
0
 public bool Equals(SinEquation other)
 {
     return(
         Mathx.IsEqual(this.dx, other.dx) &&
         Mathx.IsEqual(this.sx, other.sx) &&
         Mathx.IsEqual(this.dy, other.dy) &&
         Mathx.IsEqual(this.sy, other.sy)
         );
 }
Esempio n. 11
0
        public static bool Contains(Vector3 v0, Vector3 v1, Vector3 v2, Vector3 p)
        {
            var bc = Barycenter(v0, v1, v2, p);

            return(
                Mathx.IsEqual(bc.x + bc.y + bc.z, 1.0f) &&
                Mathx.IsInRange(bc, Vector3.zero, Vector3.one)
                );
        }
Esempio n. 12
0
 public bool Equals(Equation3 other)
 {
     return(
         Mathx.IsEqual(this.x, other.x) &&
         Mathx.IsEqual(this.y, other.y) &&
         Mathx.IsEqual(this.z, other.z) &&
         Mathx.IsEqual(this.w, other.w)
         );
 }