summaryrefslogtreecommitdiff
path: root/modules/fbx/data
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2021-06-20 03:03:06 -0400
committerAaron Franke <arnfranke@yahoo.com>2021-06-20 03:03:06 -0400
commit45c24fd039f237fa9eed03d06ccf8b3738b223e3 (patch)
treec9d0257e4991b7620baab3fd35525d7ec66eec2c /modules/fbx/data
parent60dcc4f39c0e6289dba691225c002cd6e77be6ba (diff)
Fix sub-optimal uses of is_equal_approx
Diffstat (limited to 'modules/fbx/data')
-rw-r--r--modules/fbx/data/fbx_material.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/fbx/data/fbx_material.cpp b/modules/fbx/data/fbx_material.cpp
index d54ac86e9f..292aa0c108 100644
--- a/modules/fbx/data/fbx_material.cpp
+++ b/modules/fbx/data/fbx_material.cpp
@@ -420,7 +420,7 @@ Ref<StandardMaterial3D> FBXMaterial::import_material(ImportState &state) {
} break;
case PROPERTY_DESC_COAT_ROUGHNESS: {
// meaning is that approx equal to zero is disabled not actually zero. ;)
- if (real_value && Math::is_equal_approx(real_value->Value(), 0.0f)) {
+ if (real_value && Math::is_zero_approx(real_value->Value())) {
print_verbose("clearcoat real value: " + rtos(real_value->Value()));
spatial_material->set_clearcoat_gloss(1.0 - real_value->Value());
} else {
@@ -428,7 +428,7 @@ Ref<StandardMaterial3D> FBXMaterial::import_material(ImportState &state) {
}
} break;
case PROPERTY_DESC_EMISSIVE: {
- if (real_value && Math::is_equal_approx(real_value->Value(), 0.0f)) {
+ if (real_value && Math::is_zero_approx(real_value->Value())) {
print_verbose("Emissive real value: " + rtos(real_value->Value()));
spatial_material->set_emission_energy(real_value->Value());
} else if (vector_value && !vector_value->Value().is_equal_approx(Vector3(0, 0, 0))) {