Skip to content

Commit

Permalink
Fix rational.typ
Browse files Browse the repository at this point in the history
  • Loading branch information
DanikVitek committed Oct 28, 2024
1 parent 7bba5bb commit 221d7f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rational.typ
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
let a = rational(a)
let b = rational(b)

let ordering-bytes = _p.abs_diff(a, b)
let ordering-bytes = _p.cmp(a, b)

int.from-bytes(ordering-bytes)
}
Expand Down Expand Up @@ -208,7 +208,7 @@

#let to-decimal-str(x, precision: 8) = {
let x = rational(x)
str(p.to_decimal_string(x, int.to-bytes(precision)))
str(_p.to_decimal_string(x, int.to-bytes(precision)))
}

#let to-float(x, precision: 8) = {
Expand Down

0 comments on commit 221d7f0

Please sign in to comment.