Skip to content

Commit

Permalink
stdmath updated
Browse files Browse the repository at this point in the history
  • Loading branch information
nic-gaffney committed Jun 26, 2023
1 parent 28ab9c8 commit 0de05c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions std/stdmath.sloth
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 0de05c7

Please sign in to comment.