Skip to content

Commit

Permalink
Update README.md docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DanikVitek committed Oct 25, 2024
1 parent 27277a7 commit 6db8df0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ fn div(
fn repr(numer: &[u8], denom: &[u8]) -> Result<Vec<u8>, Box<dyn Error>>;

#[wasm_func]
fn to_decimal_string(numer: &[u8], denom: &[u8]) -> Result<Vec<u8>, Box<dyn Error>>;
fn to_decimal_string(
numer: &[u8],
denom: &[u8],
precision: &[u8],
) -> Result<Vec<u8>, Box<dyn Error>>;

#[wasm_func]
fn abs_diff(
Expand Down Expand Up @@ -99,10 +103,13 @@ Functions, exported by the `rational.typ` file are:
#let repr(x)
// Returns a string, representing the rational number
#let to-decimal-str(x)
#let to-decimal-str(x, precision: 8)
// Returns a floating-point number, representing the rational number
#let to-float(x)
#let to-float(x, precision: 8)
// Returns a decimal number, representing the rational number
#let to-decimal(x, precision: 8)
// Returns |a - b|
#let abs-diff(a, b)
Expand Down

0 comments on commit 6db8df0

Please sign in to comment.