Esempio n. 1
0
 public static StepVector3 ToInt3XZ(StepVector2 o)
 {
     return(new StepVector3(o.x, 0, o.y));
 }
Esempio n. 2
0
 public static StepVector2 Rotate(StepVector2 v, int r)
 {
     r = r % 4;
     return(new StepVector2(v.x * Rotations[r * 4 + 0] + v.y * Rotations[r * 4 + 1], v.x * Rotations[r * 4 + 2] + v.y * Rotations[r * 4 + 3]));
 }
Esempio n. 3
0
 public static StepVector2 Max(StepVector2 a, StepVector2 b)
 {
     return(new StepVector2(System.Math.Max(a.x, b.x), System.Math.Max(a.y, b.y)));
 }
Esempio n. 4
0
 /** Dot product of the two coordinates */
 public static long DotLong(StepVector2 a, StepVector2 b)
 {
     return((long)a.x * (long)b.x + (long)a.y * (long)b.y);
 }