From cf92c94097e1e8ce61a6bc73671be4ee5e229571 Mon Sep 17 00:00:00 2001 From: jussi Date: Mon, 1 May 2023 22:38:59 +0300 Subject: Vector3RotateByAxisAngle was not connected. --- changelog | 1 + examples/resources/lib/vector3.lua | 2 ++ include/rmath.h | 1 + src/lua_core.c | 1 + 4 files changed, 5 insertions(+) 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 ); -- cgit v1.2.3