mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
[Core] Add is_same to types that have float components
Compares `NaN` as equal. Added to: * `AABB` * `Basis` * `Color` * `Plane` * `Projection` * `Quaternion` * `Rect2` * `Transform2D` * `Transform3D` * `Vector2` * `Vector3` * `Vector4` And added as a method in `Math`
This commit is contained in:
committed by
AThousandShips
parent
eee39f004b
commit
e825085978
@@ -699,6 +699,10 @@ bool Basis::is_equal_approx(const Basis &p_basis) const {
|
||||
return rows[0].is_equal_approx(p_basis.rows[0]) && rows[1].is_equal_approx(p_basis.rows[1]) && rows[2].is_equal_approx(p_basis.rows[2]);
|
||||
}
|
||||
|
||||
bool Basis::is_same(const Basis &p_basis) const {
|
||||
return rows[0].is_same(p_basis.rows[0]) && rows[1].is_same(p_basis.rows[1]) && rows[2].is_same(p_basis.rows[2]);
|
||||
}
|
||||
|
||||
bool Basis::is_finite() const {
|
||||
return rows[0].is_finite() && rows[1].is_finite() && rows[2].is_finite();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user