Split is_equal_approx into float and double versions to match Godot
https://github.com/godotengine/godot/pull/48882
This commit is contained in:
@@ -110,7 +110,7 @@ bool Basis::is_diagonal() const {
|
||||
}
|
||||
|
||||
bool Basis::is_rotation() const {
|
||||
return Math::is_equal_approx(determinant(), 1, UNIT_EPSILON) && is_orthogonal();
|
||||
return Math::is_equal_approx(determinant(), (real_t)1, (real_t)UNIT_EPSILON) && is_orthogonal();
|
||||
}
|
||||
|
||||
#ifdef MATH_CHECKS
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user