Split is_equal_approx into float and double versions to match Godot

https://github.com/godotengine/godot/pull/48882
This commit is contained in:
Aaron Franke
2022-09-18 17:37:31 -05:00
parent 3450a1ab16
commit 942cd466ed
3 changed files with 38 additions and 12 deletions

View File

@@ -86,7 +86,7 @@ Quaternion Quaternion::normalized() const {
}
bool Quaternion::is_normalized() const {
return Math::is_equal_approx(length_squared(), 1.0, UNIT_EPSILON); //use less epsilon
return Math::is_equal_approx(length_squared(), (real_t)1.0, (real_t)UNIT_EPSILON); //use less epsilon
}
Quaternion Quaternion::inverse() const {