summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjussi2023-05-01 22:38:59 +0300
committerjussi2023-05-01 22:38:59 +0300
commitcf92c94097e1e8ce61a6bc73671be4ee5e229571 (patch)
treec0f544aa91d2589b8b1e2808503cb82a226ed22e
parentf7a42189f054c8d81c24c8ea395d0818bb524c61 (diff)
downloadreilua-enhanced-cf92c94097e1e8ce61a6bc73671be4ee5e229571.tar.gz
reilua-enhanced-cf92c94097e1e8ce61a6bc73671be4ee5e229571.tar.bz2
reilua-enhanced-cf92c94097e1e8ce61a6bc73671be4ee5e229571.zip
Vector3RotateByAxisAngle was not connected.
-rw-r--r--changelog1
-rw-r--r--examples/resources/lib/vector3.lua2
-rw-r--r--include/rmath.h1
-rw-r--r--src/lua_core.c1
4 files changed, 5 insertions, 0 deletions
diff --git a/changelog b/changelog
index 3b874df..ef38434 100644
--- a/changelog
+++ b/changelog
@@ -64,6 +64,7 @@ Detailed changes:
- REMOVED: GetTextureSource
- REMOVED: UnloadRenderTexture
- ADDED: GetTextureType
+ - FIXED: Vector3RotateByAxisAngle was not connected.
------------------------------------------------------------------------
Release: ReiLua version 0.4.0 Using Raylib 4.2
diff --git a/examples/resources/lib/vector3.lua b/examples/resources/lib/vector3.lua
index 2a25a5f..c2a7b10 100644
--- a/examples/resources/lib/vector3.lua
+++ b/examples/resources/lib/vector3.lua
@@ -45,6 +45,8 @@ Vector3.meta = {
function Vector3:new( x, y, z )
if type( x ) == "table" then
x, y, z = table.unpack( x )
+ elseif type( x ) == "nil" then
+ x, y, z = 0, 0, 0
end
local object = setmetatable( {}, Vector3.meta )
diff --git a/include/rmath.h b/include/rmath.h
index fa9ab16..206af6e 100644
--- a/include/rmath.h
+++ b/include/rmath.h
@@ -61,6 +61,7 @@ int lmathVector3Normalize( lua_State *L );
int lmathVector3OrthoNormalize( lua_State *L );
int lmathVector3Transform( lua_State *L );
int lmathVector3RotateByQuaternion( lua_State *L );
+int lmathVector3RotateByAxisAngle( lua_State *L );
int lmathVector3Lerp( lua_State *L );
int lmathVector3Reflect( lua_State *L );
int lmathVector3Min( lua_State *L );
diff --git a/src/lua_core.c b/src/lua_core.c
index af9b6eb..bc2c7e3 100644
--- a/src/lua_core.c
+++ b/src/lua_core.c
@@ -1221,6 +1221,7 @@ void luaRegister() {
assingGlobalFunction( "Vector3OrthoNormalize", lmathVector3OrthoNormalize );
assingGlobalFunction( "Vector3Transform", lmathVector3Transform );
assingGlobalFunction( "Vector3RotateByQuaternion", lmathVector3RotateByQuaternion );
+ assingGlobalFunction( "Vector3RotateByAxisAngle", lmathVector3RotateByAxisAngle );
assingGlobalFunction( "Vector3Lerp", lmathVector3Lerp );
assingGlobalFunction( "Vector3Reflect", lmathVector3Reflect );
assingGlobalFunction( "Vector3Min", lmathVector3Min );