summaryrefslogtreecommitdiff
path: root/examples/resources/lib/utillib.lua
diff options
context:
space:
mode:
authorjussi2023-07-02 17:44:24 +0300
committerjussi2023-07-02 17:44:24 +0300
commit8ad725429292be22086d51df285907742be7a91a (patch)
tree41c13c146bb3f3f82ade36c2518d105a72b2a5dc /examples/resources/lib/utillib.lua
parent0e77452a1b4f894e342dae5583f8b02f915e8f6d (diff)
downloadreilua-enhanced-8ad725429292be22086d51df285907742be7a91a.tar.gz
reilua-enhanced-8ad725429292be22086d51df285907742be7a91a.tar.bz2
reilua-enhanced-8ad725429292be22086d51df285907742be7a91a.zip
LuaJIT compatibility.
Diffstat (limited to 'examples/resources/lib/utillib.lua')
-rw-r--r--examples/resources/lib/utillib.lua24
1 files changed, 0 insertions, 24 deletions
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