diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-11 09:25:46 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-11 09:25:46 +0200 |
commit | 58eff50bf12dc330df284d7ff78bcfa59f5a2037 (patch) | |
tree | 42b500cefeff0b4226c9596f209adc086589bdb0 /core/math/plane.cpp | |
parent | 3306ffefd1d00ac5cec0783b9a34633d2d1a6ab3 (diff) | |
parent | 5da515773d8edec988b7523ea97cdfd54c3fd16c (diff) | |
download | redot-engine-58eff50bf12dc330df284d7ff78bcfa59f5a2037.tar.gz |
Merge pull request #64268 from timothyqiu/is-finite
Add `is_finite` method for checking built-in types
Diffstat (limited to 'core/math/plane.cpp')
-rw-r--r-- | core/math/plane.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/math/plane.cpp b/core/math/plane.cpp index 3b2eab4ae2..a5d2fe5628 100644 --- a/core/math/plane.cpp +++ b/core/math/plane.cpp @@ -176,6 +176,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_finite() const { + return normal.is_finite() && Math::is_finite(d); +} + Plane::operator String() const { return "[N: " + normal.operator String() + ", D: " + String::num_real(d, false) + "]"; } |