restored old signature of mRound as it's used from scripts.

This commit is contained in:
Anis A. Hireche 2016-02-26 18:41:29 +01:00
parent 2e7018bf68
commit 0fb62de4b8

View file

@ -94,18 +94,13 @@ DefineConsoleFunction( mFloor, S32, ( F32 v ),,
return (S32)mFloor( v ); return (S32)mFloor( v );
} }
DefineConsoleFunction( mRound, S32, ( F32 v ),,
DefineConsoleFunction( mRound, F32, ( F32 v, S32 n ), (0),
"Round v to the nth decimal place or the nearest whole number by default." "Round v to the nth decimal place or the nearest whole number by default."
"@param v Value to round\n" "@param v Value to roundn"
"@param n Number of decimal places to round to, 0 by default\n"
"@return The rounded value as a S32." "@return The rounded value as a S32."
"@ingroup Math" ) "@ingroup Math" )
{ {
if(n <= 0) return mRound(v);
return mRound(v);
else
return mRound(v, n);
} }
DefineConsoleFunction( mCeil, S32, ( F32 v ),, DefineConsoleFunction( mCeil, S32, ( F32 v ),,