Browse Source

fixed Std.int with negative numbers

Nicolas Cannasse 18 years ago
parent
commit
ce0f43d12f
2 changed files with 2 additions and 0 deletions
  1. 1 0
      doc/CHANGES.txt
  2. 1 0
      std/Std.hx

+ 1 - 0
doc/CHANGES.txt

@@ -10,6 +10,7 @@
 	fixed Flash9 Type.getClassName
 	fixed Flash9 Type.getClassName
 	optional enums arguments on Flash9 are now automatically Null
 	optional enums arguments on Flash9 are now automatically Null
 	forbid usage of type parameters in static functions
 	forbid usage of type parameters in static functions
+	fixed Std.int with negative numbers
 
 
 2007-07-25: 1.14
 2007-07-25: 1.14
 	fixed no error when invalid "catch" expression
 	fixed no error when invalid "catch" expression

+ 1 - 0
std/Std.hx

@@ -65,6 +65,7 @@ class Std {
 		#if flash9
 		#if flash9
 		return untyped __global__["int"](x);
 		return untyped __global__["int"](x);
 		#else true
 		#else true
+		if( x < 0 ) return Math.ceil(x);
 		return Math.floor(x);
 		return Math.floor(x);
 		#end
 		#end
 	}
 	}