1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

round / ceil methods for c sharp vectors

(cherry picked from commit a6bd2c6e72)
This commit is contained in:
Kelly thomas
2018-05-04 20:17:10 +08:00
committed by Hein-Pieter van Braam
parent 8231b3cef8
commit f697b53eba
2 changed files with 15 additions and 0 deletions

View File

@@ -219,6 +219,11 @@ namespace Godot
return 2.0f * n * Dot(n) - this;
}
public Vector3 Round()
{
return new Vector3(Mathf.Round(x), Mathf.Round(y), Mathf.Round(z));
}
public Vector3 Rotated(Vector3 axis, real_t phi)
{
return new Basis(axis, phi).Xform(this);