浏览代码

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