Beispiel #1
0
 public float Distance(CVec3 a, CVec3 b)
 {
     return((float)Math.Sqrt(a.DistanceSqrTo(b)));
 }
Beispiel #2
0
 public float DistanceSqrTo(CVec3 o)
 {
     return((float)(Math.Pow(x - o.x, 2) + Math.Pow(y - o.y, 2) + Math.Pow(z - o.z, 2)));
 }
Beispiel #3
0
 public float DistanceTo(CVec3 o)
 {
     return((float)Math.Sqrt(DistanceSqrTo(o)));
 }
Beispiel #4
0
 public bool Equals(CVec3 other)
 {
     return(x == other.x && y == other.y && z == other.z);
 }