Explorar o código

SceneEditor: Fix quantization

trethaller %!s(int64=7) %!d(string=hai) anos
pai
achega
31bed3724d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      hide/comp/SceneEditor.hx

+ 1 - 1
hide/comp/SceneEditor.hx

@@ -380,7 +380,7 @@ class SceneEditor {
 
 			inline function quantize(x: Float, step: Float) {
 				if(step > 0) {
-					x = Math.floor(x / step) * step;
+					x = Math.round(x / step) * step;
 					x = untyped parseFloat(x.toFixed(5)); // Snap to closest nicely displayed float :cold_sweat:
 				}
 				return x;