diff options
| -rw-r--r-- | .gitattributes | 1 | ||||
| -rw-r--r-- | std/math.cup | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e785f75 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.cup linguist-language=Rust
\ No newline at end of file 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 { |