diff options
| author | Mustafa Quraish <[email protected]> | 2022-01-31 03:16:01 -0500 |
|---|---|---|
| committer | Mustafa Quraish <[email protected]> | 2022-01-31 03:21:09 -0500 |
| commit | 3ae0351ea110eb8bd6a4831ae1c3dd125852afdf (patch) | |
| tree | d45d9166d3460c6aab448d32cc8691ada08fa161 /std/math.cup | |
| parent | Add workflow to run tests on push (diff) | |
| download | cup-3ae0351ea110eb8bd6a4831ae1c3dd125852afdf.tar.xz cup-3ae0351ea110eb8bd6a4831ae1c3dd125852afdf.zip | |
Add .gitattributes to try to highlight code as Rust
Diffstat (limited to 'std/math.cup')
| -rw-r--r-- | std/math.cup | 2 |
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 { |