CORRECTION - Code simplification - round()
This commit is contained in:
parent
c8ae8bab6b
commit
b9321b4ed8
1 changed files with 1 additions and 1 deletions
|
|
@ -299,7 +299,7 @@ Any floating point number.
|
|||
|
||||
|
||||
sub round {
|
||||
return int( $_[ 0 ] + 0.5 );
|
||||
return int( $_ < 0 ? $_ - 0.5 : $_ + 0.5 );
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue