diff options
| author | jussi | 2024-03-17 10:38:30 +0200 |
|---|---|---|
| committer | jussi | 2024-03-17 10:38:30 +0200 |
| commit | ae1d0b65f16b24f2e0db39cb8baef4af57b2a12f (patch) | |
| tree | 80358810635da19821bdb38ece2098c2dd48f1ff /src/rmath.c | |
| parent | ca238975dc63d2dddcd2b17ad627bedc95dd158c (diff) | |
| download | reilua-enhanced-ae1d0b65f16b24f2e0db39cb8baef4af57b2a12f.tar.gz reilua-enhanced-ae1d0b65f16b24f2e0db39cb8baef4af57b2a12f.tar.bz2 reilua-enhanced-ae1d0b65f16b24f2e0db39cb8baef4af57b2a12f.zip | |
Round and pubsub lib.
Diffstat (limited to 'src/rmath.c')
| -rw-r--r-- | src/rmath.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/rmath.c b/src/rmath.c index 2b05c7e..7617d45 100644 --- a/src/rmath.c +++ b/src/rmath.c @@ -16,6 +16,21 @@ inline int imax( int a, int b ) { */ /* +> 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 ) Clamp float value |
