aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornic-gaffney <gaffney_nic@protonmail.com>2023-06-25 20:12:15 -0500
committernic-gaffney <gaffney_nic@protonmail.com>2023-06-25 20:12:15 -0500
commit0de05c7033940966eac811557c3eb85f1ff4e21b (patch)
tree4bcfec04bfc9a16a6e0cdb5a12379be893bdc31f
parent28ab9c8ba094d86dbcb9abb853dddd83dca028cc (diff)
downloadsloth-0de05c7033940966eac811557c3eb85f1ff4e21b.tar.gz
stdmath updated
-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 {