summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-11 09:25:46 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-10-11 09:25:46 +0200
commit58eff50bf12dc330df284d7ff78bcfa59f5a2037 (patch)
tree42b500cefeff0b4226c9596f209adc086589bdb0 /servers
parent3306ffefd1d00ac5cec0783b9a34633d2d1a6ab3 (diff)
parent5da515773d8edec988b7523ea97cdfd54c3fd16c (diff)
Merge pull request #64268 from timothyqiu/is-finite
Add `is_finite` method for checking built-in types
Diffstat (limited to 'servers')
-rw-r--r--servers/rendering/renderer_scene_cull.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp
index 2b25e8962f..d0cb46dee9 100644
--- a/servers/rendering/renderer_scene_cull.cpp
+++ b/servers/rendering/renderer_scene_cull.cpp
@@ -869,12 +869,7 @@ void RendererSceneCull::instance_set_transform(RID p_instance, const Transform3D
for (int i = 0; i < 4; i++) {
const Vector3 &v = i < 3 ? p_transform.basis.rows[i] : p_transform.origin;
- ERR_FAIL_COND(Math::is_inf(v.x));
- ERR_FAIL_COND(Math::is_nan(v.x));
- ERR_FAIL_COND(Math::is_inf(v.y));
- ERR_FAIL_COND(Math::is_nan(v.y));
- ERR_FAIL_COND(Math::is_inf(v.z));
- ERR_FAIL_COND(Math::is_nan(v.z));
+ ERR_FAIL_COND(!v.is_finite());
}
#endif