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