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 ) )); }
public static LuaVector3D SnappedToGrid(LuaVector3D v) { Vector2D snapped = General.Map.Grid.SnappedToGrid(v.vec); return(new LuaVector3D(snapped.x, snapped.y, v.vec.z)); }
public static LuaVector3D Reversed(LuaVector3D r) { return(new LuaVector3D(Vector3D.Reversed(r.vec))); }
public static LuaVector3D Reflect(LuaVector3D v, LuaVector3D m) { return(new LuaVector3D(Vector3D.Reflect(v.vec, m.vec))); }
public static LuaVector3D CrossProduct(LuaVector3D a, LuaVector3D b) { return(new LuaVector3D(Vector3D.CrossProduct(a.vec, b.vec))); }
public static float DotProduct(LuaVector3D a, LuaVector3D b) { return(Vector3D.DotProduct(a.vec, b.vec)); }