From b9321b4ed867611456dc4aa5eb027e46c82d5691 Mon Sep 17 00:00:00 2001 From: "John W. Krahn" Date: Tue, 4 Feb 2003 05:17:32 +0000 Subject: [PATCH] CORRECTION - Code simplification - round() --- lib/WebGUI/Utility.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); } #-------------------------------------------------------------------