aboutsummaryrefslogtreecommitdiff
path: root/std/math.cup
diff options
context:
space:
mode:
Diffstat (limited to 'std/math.cup')
-rw-r--r--std/math.cup22
1 files changed, 0 insertions, 22 deletions
diff --git a/std/math.cup b/std/math.cup
deleted file mode 100644
index d58aa86..0000000
--- a/std/math.cup
+++ /dev/null
@@ -1,22 +0,0 @@
-fn min(a: int, b: int): int {
- return a < b ? a : b;
-}
-
-fn max(a: int, b: int): int {
- return a > b ? a : b;
-}
-
-fn sign(a: int): int {
- return a > 0 ? 1 : a == 0 ? 0 : -1;
-}
-
-fn abs(a: int): int {
- return a * sign(a);
-}
-
-fn factorial(n: int): int {
- let res: int = 1;
- for (;n > 0; n = n - 1)
- res = res * n;
- return res;
-} \ No newline at end of file