Browse Source

Merge pull request #35341 from timothyqiu/negative-zero

Prevent negative zero shown in SpotLight gizmo
Rémi Verschelde 5 năm trước cách đây
mục cha
commit
9b9ac2420f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      editor/spatial_editor_gizmos.cpp

+ 1 - 1
editor/spatial_editor_gizmos.cpp

@@ -885,7 +885,7 @@ void LightSpatialGizmoPlugin::set_handle(EditorSpatialGizmo *p_gizmo, int p_idx,
 				d = Math::stepify(d, SpatialEditor::get_singleton()->get_translate_snap());
 			}
 
-			if (d < 0)
+			if (d <= 0) // Equal is here for negative zero.
 				d = 0;
 
 			light->set_param(Light::PARAM_RANGE, d);