Quellcode durchsuchen

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 vor 10 Jahren
Ursprung
Commit
df56db39a3
1 geänderte Dateien mit 1 neuen und 3 gelöschten Zeilen
  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);