示例#1
0
文件: StepVector3.cs 项目: hui64/Test
 public static StepVector3 ToInt3XZ(StepVector2 o)
 {
     return(new StepVector3(o.x, 0, o.y));
 }
示例#2
0
文件: StepVector3.cs 项目: hui64/Test
 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]));
 }
示例#3
0
文件: StepVector3.cs 项目: hui64/Test
 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)));
 }
示例#4
0
文件: StepVector3.cs 项目: hui64/Test
 /** 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);
 }