소스 검색

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