aboutsummaryrefslogtreecommitdiff
path: root/std/stdmath.sloth
diff options
context:
space:
mode:
Diffstat (limited to 'std/stdmath.sloth')
-rw-r--r--std/stdmath.sloth4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/stdmath.sloth b/std/stdmath.sloth
index 0f967eb..7ff5c82 100644
--- a/std/stdmath.sloth
+++ b/std/stdmath.sloth
@@ -8,7 +8,7 @@ fn abs(x: Int) Int {
}
fn fabs(x: Float) Float {
- if x < 0 {
+ if x < 0.0 {
return -x;
}
return x;
@@ -51,7 +51,7 @@ fn pow(x: Int, y: Int) Int {
}
fn floor(x: Float) Float {
- return x - abs(x % 1.0);
+ return x - fabs(x % 1.0);
}
fn ceil(x: Float) Float {