From 0de05c7033940966eac811557c3eb85f1ff4e21b Mon Sep 17 00:00:00 2001 From: nic-gaffney Date: Sun, 25 Jun 2023 20:12:15 -0500 Subject: [PATCH] stdmath updated --- std/stdmath.sloth | 4 ++-- 1 file 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 {