diff options
Diffstat (limited to 'gen/src/std@float.erl')
-rw-r--r-- | gen/src/std@float.erl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gen/src/std@float.erl b/gen/src/std@float.erl new file mode 100644 index 0000000..c627707 --- /dev/null +++ b/gen/src/std@float.erl @@ -0,0 +1,22 @@ +-module(std@float). +-compile(no_auto_import). + +-export([parse/1, to_string/1, ceiling/1, floor/1, round/1, truncate/1]). + +parse(A) -> + gleam__stdlib:parse_float(A). + +to_string(F) -> + std@iodata:to_string(std@iodata:from_float(F)). + +ceiling(A) -> + math:ceil(A). + +floor(A) -> + math:floor(A). + +round(A) -> + erlang:round(A). + +truncate(A) -> + erlang:trunc(A). |