From 72d9aef42bb085c4860ee2b1c3ac293035848d15 Mon Sep 17 00:00:00 2001 From: TheFGFSEagle Date: Wed, 20 Sep 2023 00:45:06 +0200 Subject: [PATCH] Nasal math module: Add math.sign -> math.sgn alias --- Nasal/math.nas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Nasal/math.nas b/Nasal/math.nas index 838856e14..ee8a5ef13 100644 --- a/Nasal/math.nas +++ b/Nasal/math.nas @@ -1,6 +1,7 @@ var abs = func(n) { n < 0 ? -n : n } var sgn = func(x) { x < 0 ? -1 : x > 0 } +var sign = sgn; var max = func(x) { var n = x; @@ -46,4 +47,4 @@ var log10 = func(x) { ln(x) * _iln10 } var approx_eq = func (a,b, d = 0.000001) { return (abs(a-b) < d); -} \ No newline at end of file +}