Преглед на файлове

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