Added various functions basic math classes. Also enabled math checks only for debug builds.

Added set_scale, set_rotation_euler, set_rotation_axis_angle. Addresses #2565 directly.
Added an euler angle constructor for Basis in GDScript and also exposed is_normalized for vectors and quaternions.
Various other changes mostly cosmetic in nature.
This commit is contained in:
Ferenc Arn
2017-04-06 13:03:56 -05:00
parent 454f53c776
commit 9a37ff1e34
13 changed files with 217 additions and 50 deletions
+4
View File
@@ -91,6 +91,10 @@ Quat Quat::normalized() const {
return *this / length();
}
bool Quat::is_normalized() const {
return Math::is_equal_approx(length(), 1.0);
}
Quat Quat::inverse() const {
return Quat(-x, -y, -z, w);
}