diff options
| author | jussi | 2024-07-06 01:03:02 +0300 |
|---|---|---|
| committer | jussi | 2024-07-06 01:03:02 +0300 |
| commit | 528f3f3d822c8e9d3e72228cf5d7fc3d4daae483 (patch) | |
| tree | 9a122a3a3ed92b33e372fb53dc8e9717ecb7bd01 /src | |
| parent | 61c932f2605aac5a8fef4264087e9ea8f86c6760 (diff) | |
| download | reilua-enhanced-528f3f3d822c8e9d3e72228cf5d7fc3d4daae483.tar.gz reilua-enhanced-528f3f3d822c8e9d3e72228cf5d7fc3d4daae483.tar.bz2 reilua-enhanced-528f3f3d822c8e9d3e72228cf5d7fc3d4daae483.zip | |
Raymath *Equals functions return bool instead of int.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rmath.c | 16 | ||||
| -rw-r--r-- | src/textures.c | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/rmath.c b/src/rmath.c index 1fa9690..aae76f8 100644 --- a/src/rmath.c +++ b/src/rmath.c @@ -137,13 +137,13 @@ int lmathWrap( lua_State* L ) { Check whether two given floats are almost equal -- Success return int +- Success return bool */ int lmathFloatEquals( lua_State* L ) { float x = luaL_checknumber( L, 1 ); float y = luaL_checknumber( L, 2 ); - lua_pushinteger( L, FloatEquals( x, y ) ); + lua_pushboolean( L, FloatEquals( x, y ) == 1 ); return 1; } @@ -570,13 +570,13 @@ int lmathVector2ClampValue( lua_State* L ) { Check whether two given vectors are almost equal -- Success return int +- Success return bool */ int lmathVector2Equals( lua_State* L ) { Vector2 v1 = uluaGetVector2( L, 1 ); Vector2 v2 = uluaGetVector2( L, 2 ); - lua_pushinteger( L, Vector2Equals( v1, v2 ) ); + lua_pushboolean( L, Vector2Equals( v1, v2 ) == 1 ); return 1; } @@ -1136,13 +1136,13 @@ int lmathVector3ClampValue( lua_State* L ) { Check whether two given vectors are almost equal -- Success return int +- Success return bool */ int lmathVector3Equals( lua_State* L ) { Vector3 v1 = uluaGetVector3( L, 1 ); Vector3 v2 = uluaGetVector3( L, 2 ); - lua_pushinteger( L, Vector3Equals( v1, v2 ) ); + lua_pushboolean( L, Vector3Equals( v1, v2 ) == 1 ); return 1; } @@ -1853,13 +1853,13 @@ int lmathQuaternionTransform( lua_State* L ) { Check whether two given quaternions are almost equal -- Success return int +- Success return bool */ int lmathQuaternionEquals( lua_State* L ) { Quaternion q1 = uluaGetQuaternion( L, 1 ); Quaternion q2 = uluaGetQuaternion( L, 2 ); - lua_pushinteger( L, QuaternionEquals( q1, q2 ) ); + lua_pushboolean( L, QuaternionEquals( q1, q2 ) == 1 ); return 1; } diff --git a/src/textures.c b/src/textures.c index a5189b1..9d7221a 100644 --- a/src/textures.c +++ b/src/textures.c @@ -1897,7 +1897,7 @@ Returns hexadecimal value for a Color int ltexturesColorToInt( lua_State* L ) { Color color = uluaGetColor( L, 1 ); - lua_pushinteger( L, ColorToInt( color ) ); + lua_pushinteger( L, (unsigned int)ColorToInt( color ) ); return 1; } |
