mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Use approximate equallity methods in many places
This commit is contained in:
@@ -2654,7 +2654,7 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
|
||||
if (ABS(light_axis[i]) < CMP_EPSILON)
|
||||
if (Math::is_zero_approx(light_axis[i]))
|
||||
continue;
|
||||
clip[clip_planes].normal[i] = 1.0;
|
||||
|
||||
@@ -2789,7 +2789,7 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
|
||||
|
||||
for (int c = 0; c < 3; c++) {
|
||||
|
||||
if (ABS(light_axis[c]) < CMP_EPSILON)
|
||||
if (Math::is_zero_approx(light_axis[c]))
|
||||
continue;
|
||||
clip[clip_planes].normal[c] = 1.0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user