Make more use of DefineConsoleMethod

Resubmission of #887 with some fixes.
Looks like it was a type-o to me

 

From: Daniel Buckmaster [mailto:notifications@github.com] 
Sent: Tuesday, December 23, 2014 1:21 AM
To: GarageGames/Torque3D
Cc: Vincent Gee
Subject: Re: [Torque3D] Make more use of DefineConsoleMethod (#1072)

 

In Engine/source/math/mConsoleFunctions.cpp <https://github.com/GarageGames/Torque3D/pull/1072#discussion-diff-22204653> :

> @@ -94,14 +94,22 @@ DefineConsoleFunction( mFloor, S32, ( F32 v ),,
>     return (S32)mFloor( v );
>  }
>  
> -DefineConsoleFunction( mRound, S32, ( F32 v ),,
> -    "Round v to the nearest integer.\n"
> -    "@param v Number to convert to integer."
> -    "@returns Number converted to integer."
> -    "@ingroup Math" )
> -{
> -   return (S32)mFloor( v + 0.5f );
> -}
> +DefineConsoleFunction( mRound, F32, ( F32 v, S32 n ), (0),  

Do we? Seems like it should definitely return an integer.

—
Reply to this email directly or view it on GitHub <https://github.com/GarageGames/Torque3D/pull/1072/files#r22204653> .  <https://github.com/notifications/beacon/ACUNZJf0VmgNelc__yx7JzU-PsziGp69ks5naQE2gaJpZM4DK_cn.gif>