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
@@ -172,6 +172,10 @@ bool Plane::is_equal_approx(const Plane &p_plane) const {
|
||||
return normal.is_equal_approx(p_plane.normal) && Math::is_equal_approx(d, p_plane.d);
|
||||
}
|
||||
|
||||
bool Plane::is_same(const Plane &p_plane) const {
|
||||
return normal.is_same(p_plane.normal) && Math::is_same(d, p_plane.d);
|
||||
}
|
||||
|
||||
bool Plane::is_finite() const {
|
||||
return normal.is_finite() && Math::is_finite(d);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user