Snap to ground and grid options

This commit is contained in:
dexyfex
2018-02-25 23:30:29 +11:00
Unverified
parent 26533807fe
commit a590df5035
7 changed files with 282 additions and 21 deletions
+5
View File
@@ -16,6 +16,11 @@ namespace CodeWalker
}
public static Vector3 Round(this Vector3 v)
{
return new Vector3((float)Math.Round(v.X), (float)Math.Round(v.Y), (float)Math.Round(v.Z));
}
public static Vector4 Floor(this Vector4 v)
{
return new Vector4((float)Math.Floor(v.X), (float)Math.Floor(v.Y), (float)Math.Floor(v.Z), (float)Math.Floor(v.W));