Skip to content

Commit

Permalink
Merge pull request AdamAtomic#79 from IQAndreas/fix_issue_191
Browse files Browse the repository at this point in the history
Fix issue AdamAtomic#191 - Fixed FlxU.round() giving incorrect results for negative numbers
  • Loading branch information
IQAndreas committed Sep 14, 2012
2 parents 8989e50 + 96bfd5f commit adfb381
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions org/flixel/FlxU.as
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ package org.flixel
*/
static public function round(Value:Number):Number
{
var number:Number = int(Value+((Value>0)?0.5:-0.5));
return (Value>0)?(number):((number!=Value)?(number-1):(number));
return int(Value+((Value>0)?0.5:-0.5));
}

/**
Expand Down

0 comments on commit adfb381

Please sign in to comment.