Merge pull request #35341 from timothyqiu/negative-zero

Prevent negative zero shown in SpotLight gizmo
This commit is contained in:
Rémi Verschelde 2020-01-20 06:51:35 +01:00 committed by GitHub
commit 9b9ac2420f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);