aboutsummaryrefslogtreecommitdiff
path: root/gen/src
diff options
context:
space:
mode:
Diffstat (limited to 'gen/src')
-rw-r--r--gen/src/gleam@float.erl11
-rw-r--r--gen/src/gleam@int.erl11
2 files changed, 20 insertions, 2 deletions
diff --git a/gen/src/gleam@float.erl b/gen/src/gleam@float.erl
index 6aab56b..625ba56 100644
--- a/gen/src/gleam@float.erl
+++ b/gen/src/gleam@float.erl
@@ -1,7 +1,7 @@
-module(gleam@float).
-compile(no_auto_import).
--export([parse/1, to_string/1, compare/2, ceiling/1, floor/1, round/1, truncate/1]).
+-export([parse/1, to_string/1, compare/2, min/2, ceiling/1, floor/1, round/1, truncate/1]).
parse(A) ->
gleam_stdlib:parse_float(A).
@@ -24,6 +24,15 @@ compare(A, B) ->
end
end.
+min(A, B) ->
+ case A < B of
+ true ->
+ A;
+
+ false ->
+ B
+ end.
+
ceiling(A) ->
math:ceil(A).
diff --git a/gen/src/gleam@int.erl b/gen/src/gleam@int.erl
index ea97785..de9ce8b 100644
--- a/gen/src/gleam@int.erl
+++ b/gen/src/gleam@int.erl
@@ -1,7 +1,7 @@
-module(gleam@int).
-compile(no_auto_import).
--export([parse/1, to_string/1, to_base_string/2, compare/2]).
+-export([parse/1, to_string/1, to_base_string/2, compare/2, min/2]).
parse(A) ->
gleam_stdlib:parse_int(A).
@@ -26,3 +26,12 @@ compare(A, B) ->
gt
end
end.
+
+min(A, B) ->
+ case A < B of
+ true ->
+ A;
+
+ false ->
+ B
+ end.