diff options
| author | nic-gaffney <gaffney_nic@protonmail.com> | 2023-06-25 20:12:15 -0500 |
|---|---|---|
| committer | nic-gaffney <gaffney_nic@protonmail.com> | 2023-06-25 20:12:15 -0500 |
| commit | 0de05c7033940966eac811557c3eb85f1ff4e21b (patch) | |
| tree | 4bcfec04bfc9a16a6e0cdb5a12379be893bdc31f /std/stdmath.sloth | |
| parent | 28ab9c8ba094d86dbcb9abb853dddd83dca028cc (diff) | |
| download | sloth-0de05c7033940966eac811557c3eb85f1ff4e21b.tar.gz | |
stdmath updated
Diffstat (limited to 'std/stdmath.sloth')
| -rw-r--r-- | std/stdmath.sloth | 4 |
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 { |
