summaryrefslogtreecommitdiff
path: root/src/rmath.c
diff options
context:
space:
mode:
authorjussi2024-07-06 01:03:02 +0300
committerjussi2024-07-06 01:03:02 +0300
commit528f3f3d822c8e9d3e72228cf5d7fc3d4daae483 (patch)
tree9a122a3a3ed92b33e372fb53dc8e9717ecb7bd01 /src/rmath.c
parent61c932f2605aac5a8fef4264087e9ea8f86c6760 (diff)
downloadreilua-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/rmath.c')
-rw-r--r--src/rmath.c16
1 files changed, 8 insertions, 8 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;
}