Switched to Raylib vertion 4.5. Removed some functions and added others. Main changes to camera3D.

This commit is contained in:
jussi
2023-04-06 19:19:44 +03:00
parent 2526c9732e
commit fe15e836bd
25 changed files with 744 additions and 957 deletions

View File

@@ -411,6 +411,31 @@ int lmathVector2Angle( lua_State *L ) {
return 1;
}
/*
> result = RL.Vector2LineAngle( Vector2 start, Vector2 end )
Calculate angle defined by a two vectors line.
NOTE: Parameters need to be normalized.
Current implementation should be aligned with glm::angle.
- Failure return false
- Success return float
*/
int lmathVector2LineAngle( lua_State *L ) {
if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) {
TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2LineAngle( Vector2 start, Vector2 end )" );
lua_pushboolean( L, false );
return 1;
}
Vector2 end = uluaGetVector2( L );
lua_pop( L, 1 );
Vector2 start = uluaGetVector2( L );
lua_pushnumber( L, Vector2LineAngle( start, end ) );
return 1;
}
/*
> result = RL.Vector2Scale( Vector2 v, float scale )