From 5da515773d8edec988b7523ea97cdfd54c3fd16c Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Thu, 11 Aug 2022 16:12:27 +0800 Subject: Add `is_finite` method for checking built-in types --- servers/rendering/renderer_scene_cull.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'servers') 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 -- cgit v1.2.3