mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-21 06:26:38 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user