aboutsummaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
authorMustafa Quraish <[email protected]>2022-01-31 03:16:01 -0500
committerMustafa Quraish <[email protected]>2022-01-31 03:21:09 -0500
commit3ae0351ea110eb8bd6a4831ae1c3dd125852afdf (patch)
treed45d9166d3460c6aab448d32cc8691ada08fa161 /std
parentAdd workflow to run tests on push (diff)
downloadcup-3ae0351ea110eb8bd6a4831ae1c3dd125852afdf.tar.xz
cup-3ae0351ea110eb8bd6a4831ae1c3dd125852afdf.zip
Add .gitattributes to try to highlight code as Rust
Diffstat (limited to 'std')
-rw-r--r--std/math.cup2
1 files changed, 1 insertions, 1 deletions
diff --git a/std/math.cup b/std/math.cup
index 9ac935c..d58aa86 100644
--- a/std/math.cup
+++ b/std/math.cup
@@ -7,7 +7,7 @@ fn max(a: int, b: int): int {
}
fn sign(a: int): int {
- return a > 0 ? 1 : a < 0 ? -1 : 0;
+ return a > 0 ? 1 : a == 0 ? 0 : -1;
}
fn abs(a: int): int {