UDF MathRoundReal

MathRoundReal.
function MathRoundReal takes real r_number, real r_round returns real
 * set r_number = r_number - ModuloReal( r_number, r_round )
 * return r_number

endfunction

r_number - Number to round

r_round - Number to round by

Usage:

//The following will display a plain white message containing 10.000 to all players

call DisplayTextToForce( GetPlayersAll, R2S( MathRoundReal( 10.56, 1.00 ) ) )

Drasnian 21:09, 2 July 2008 (UTC)