From 4452bccfa63cf86c134aa616ee0bebcc66beca03 Mon Sep 17 00:00:00 2001 From: jussi Date: Wed, 1 May 2024 15:21:28 +0300 Subject: Bitwise operations for cross Lua compatibility. --- include/bitwiseOp.h | 12 ++++++++++++ include/rmath.h | 1 + 2 files changed, 13 insertions(+) create mode 100644 include/bitwiseOp.h (limited to 'include') diff --git a/include/bitwiseOp.h b/include/bitwiseOp.h new file mode 100644 index 0000000..e2d3c42 --- /dev/null +++ b/include/bitwiseOp.h @@ -0,0 +1,12 @@ +#pragma once + +/* Arithmetic. */ +int lbitAnd( lua_State* L ); +int lbitOr( lua_State* L ); +int lbitXor( lua_State* L ); +int lbitNot( lua_State* L ); +int lbitShiftLeft( lua_State* L ); +int lbitShiftRight( lua_State* L ); +int lbitSet( lua_State* L ); +int lbitGet( lua_State* L ); +int lbitToggle( lua_State* L ); diff --git a/include/rmath.h b/include/rmath.h index 249bcce..07132aa 100644 --- a/include/rmath.h +++ b/include/rmath.h @@ -5,6 +5,7 @@ int imax( int a, int b ); /* Utils. */ int lmathRound( lua_State* L ); +int lmathSign( lua_State* L ); int lmathClamp( lua_State* L ); int lmathLerp( lua_State* L ); int lmathNormalize( lua_State* L ); -- cgit v1.2.3