diff --git a/lib/WebGUI/Utility.pm b/lib/WebGUI/Utility.pm index f84e4e7ea..64a1c6421 100644 --- a/lib/WebGUI/Utility.pm +++ b/lib/WebGUI/Utility.pm @@ -299,7 +299,7 @@ Any floating point number. sub round { - return int( $_[ 0 ] + 0.5 ); + return int( $_ < 0 ? $_ - 0.5 : $_ + 0.5 ); } #-------------------------------------------------------------------