summaryrefslogtreecommitdiff
path: root/examples/resources/lib/utillib.lua
diff options
context:
space:
mode:
authorjussi2023-11-03 23:12:55 +0200
committerjussi2023-11-03 23:12:55 +0200
commitd74a505d406faf276a265beaf8925d6e8ff9cec0 (patch)
tree72de6e187e0e745f21a9190f5d02895fcecaf83c /examples/resources/lib/utillib.lua
parente61823b8bb69e258370503df7969e4e3c2089e2d (diff)
downloadreilua-enhanced-d74a505d406faf276a265beaf8925d6e8ff9cec0.tar.gz
reilua-enhanced-d74a505d406faf276a265beaf8925d6e8ff9cec0.tar.bz2
reilua-enhanced-d74a505d406faf276a265beaf8925d6e8ff9cec0.zip
Compress/decompress and Encode/Decode DataBase64.
Diffstat (limited to 'examples/resources/lib/utillib.lua')
-rw-r--r--examples/resources/lib/utillib.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/resources/lib/utillib.lua b/examples/resources/lib/utillib.lua
index 94e33f9..899f899 100644
--- a/examples/resources/lib/utillib.lua
+++ b/examples/resources/lib/utillib.lua
@@ -146,6 +146,13 @@ function utillib.printt( t )
print( "}" )
end
+function utillib.colorLerp( a, b, f )
+ return {
+ utillib.round( utillib.lerp( a[1], b[1], f ) ),
+ utillib.round( utillib.lerp( a[2], b[2], f ) ),
+ utillib.round( utillib.lerp( a[3], b[3], f ) ) }
+end
+
-- Move secuence of elements inside table.
function utillib.tableMove( t, src, len, dest )
local copy = table.move( t, src, src + len - 1, 1, {} )