Преглед изворни кода

fix of "too much local variables" in Math unit test

This is NOT optimized with analyzer. It just generates useless tmp vars
in this case.
PeyTy пре 10 година
родитељ
комит
df56db39a3
1 измењених фајлова са 1 додато и 3 уклоњено
  1. 1 3
      std/lua/_std/Math.hx

+ 1 - 3
std/lua/_std/Math.hx

@@ -61,9 +61,7 @@ class Math
 	public static inline function min(a:Float, b:Float):Float   return lua.Math.min(a,b);
 	public static inline function pow(v:Float, exp:Float):Float return lua.Math.pow(v,exp);
 
-	public static inline function round(v:Float):Int {
-		return Std.int(v + 0.5);
-	}
+	public static inline function round(v:Float):Int return Math.floor(v + 0.5);
 
 	public static inline function ffloor( v : Float ) : Float return floor(v); 
 	public static inline function fceil( v : Float ) : Float return ceil(v);