From c8e5f1e67788976ff65611fbf77b3be13bffd79a Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 4 Apr 2024 00:33:07 +0100 Subject: launch cactus --- numutil.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 numutil.lua (limited to 'numutil.lua') diff --git a/numutil.lua b/numutil.lua new file mode 100644 index 0000000..ce212c4 --- /dev/null +++ b/numutil.lua @@ -0,0 +1,11 @@ +local function sign(x) + if x > 0 then return 1 + elseif x < 0 then return -1 + else return 0 + end +end + + +return { + sign = sign, +} -- cgit v1.2.3