Beispiel #1
0
 public double Distance(Int2 b)
 {
     return(Math.Sqrt(DistanceSquared(b)));
 }
Beispiel #2
0
 public int DistanceSquared(Int2 b)
 {
     return((this - b).LengthSquared);
 }
Beispiel #3
0
 public static V <int> ToVector(this Int2 p)
 {
     return(new V <int>(new int[] { p.X, p.Y }));
 }
Beispiel #4
0
 public static Int2 Max(Int2 a, Int2 b)
 {
     return(new Int2(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)));
 }
Beispiel #5
0
 public Float2(Int2 xy)
 {
     X = xy.X;
     Y = xy.Y;
 }