From 8ad725429292be22086d51df285907742be7a91a Mon Sep 17 00:00:00 2001 From: jussi Date: Sun, 2 Jul 2023 17:44:24 +0300 Subject: LuaJIT compatibility. --- examples/resources/lib/utillib.lua | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'examples/resources/lib/utillib.lua') diff --git a/examples/resources/lib/utillib.lua b/examples/resources/lib/utillib.lua index 920ebd7..ed4e787 100644 --- a/examples/resources/lib/utillib.lua +++ b/examples/resources/lib/utillib.lua @@ -41,27 +41,6 @@ function utillib.clamp( val, min, max ) return math.max( min, math.min( val, max ) ) end --- Returns changed value ( value to be changed, index, state( bool ) ) -function utillib.setBit( v, i, b ) - if b then - return v | 1 << i - else - return v & ~( 1 << i ) - end -end - -function utillib.toggleBit( v, i ) - return v ~ ( 1 << i ) -end - -function utillib.getBit( v, i ) - if v == nil then - return false - end - - return v & ( 1 << i ) > 0 -end - function utillib.utf8Sub( s, i, j ) i = i or 1 j = j or -1 @@ -114,9 +93,6 @@ function utillib.split( str, sep ) for str in string.gmatch( str, "([^"..sep.."]+)" ) do table.insert( t, str ) end - -- for s in string.gmatch( str, "([^"..sep.."]+)" ) do - -- table.insert( t, s ) - -- end return t end -- cgit v1.2.3