Example #1
0
 public static LuaVector3D SnappedToAccuracy(LuaVector3D v)
 {
     return(new LuaVector3D(
                new Vector3D(
                    (float)Math.Round(v.vec.x, General.Map.FormatInterface.VertexDecimals),
                    (float)Math.Round(v.vec.y, General.Map.FormatInterface.VertexDecimals),
                    v.vec.z
                    )
                ));
 }
Example #2
0
        public static LuaVector3D SnappedToGrid(LuaVector3D v)
        {
            Vector2D snapped = General.Map.Grid.SnappedToGrid(v.vec);

            return(new LuaVector3D(snapped.x, snapped.y, v.vec.z));
        }
Example #3
0
 public static LuaVector3D Reversed(LuaVector3D r)
 {
     return(new LuaVector3D(Vector3D.Reversed(r.vec)));
 }
Example #4
0
 public static LuaVector3D Reflect(LuaVector3D v, LuaVector3D m)
 {
     return(new LuaVector3D(Vector3D.Reflect(v.vec, m.vec)));
 }
Example #5
0
 public static LuaVector3D CrossProduct(LuaVector3D a, LuaVector3D b)
 {
     return(new LuaVector3D(Vector3D.CrossProduct(a.vec, b.vec)));
 }
Example #6
0
 public static float DotProduct(LuaVector3D a, LuaVector3D b)
 {
     return(Vector3D.DotProduct(a.vec, b.vec));
 }