Round and pubsub lib.
This commit is contained in:
15
src/rmath.c
15
src/rmath.c
@@ -15,6 +15,21 @@ inline int imax( int a, int b ) {
|
||||
## Math - Utils
|
||||
*/
|
||||
|
||||
/*
|
||||
> result = RL.Round( float value )
|
||||
|
||||
Round float value
|
||||
|
||||
- Success return float
|
||||
*/
|
||||
int lmathRound( lua_State* L ) {
|
||||
float value = luaL_checknumber( L, 1 );
|
||||
|
||||
lua_pushnumber( L, round( value ) );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
> result = RL.Clamp( float value, float min, float max )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user