Bläddra i källkod

SceneEditor: Fix quantization

trethaller 7 år sedan
förälder
incheckning
31bed3724d
1 ändrade filer med 1 tillägg och 1 borttagningar
  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;