public static StepVector3 ToInt3XZ(StepVector2 o) { return(new StepVector3(o.x, 0, o.y)); }
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])); }
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))); }
/** 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); }