summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2022-08-11 16:12:27 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2022-10-08 13:25:08 +0800
commit5da515773d8edec988b7523ea97cdfd54c3fd16c (patch)
tree1107edc8f9bcff011b9bf789cf0e54bc9d46c28d /servers
parent18177828ad97286ca88cbdcfb763c967858d051b (diff)
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