diff options
author | Louis Pilfold <louis@lpil.uk> | 2021-08-08 18:54:25 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2021-08-08 18:54:25 +0100 |
commit | d8407c576cc04ae2c104fb4ff5999cb5307981e1 (patch) | |
tree | 87175db5699b82b47d8f57b0a0e0d3516ea26530 /src/gleam_stdlib.js | |
parent | 7ca5f50aff6cb19c43ac39170e829cce1a48fdb9 (diff) | |
download | gleam_stdlib-d8407c576cc04ae2c104fb4ff5999cb5307981e1.tar.gz gleam_stdlib-d8407c576cc04ae2c104fb4ff5999cb5307981e1.zip |
Remaining float functions for JS
Diffstat (limited to 'src/gleam_stdlib.js')
-rw-r--r-- | src/gleam_stdlib.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gleam_stdlib.js b/src/gleam_stdlib.js index 8b2f131..479b8a9 100644 --- a/src/gleam_stdlib.js +++ b/src/gleam_stdlib.js @@ -236,3 +236,11 @@ export function floor(float) { export function round(float) { return Math.round(float); } + +export function truncate(float) { + return Math.trunc(float); +} + +export function power(base, exponent) { + return Math.pow(base, exponent); +} |