From d8407c576cc04ae2c104fb4ff5999cb5307981e1 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Sun, 8 Aug 2021 18:54:25 +0100 Subject: Remaining float functions for JS --- src/gleam_stdlib.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gleam_stdlib.js') 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); +} -- cgit v1.2.3