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 625ba56..7eb18cf 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, min/2, ceiling/1, floor/1, round/1, truncate/1]).
+-export([parse/1, to_string/1, compare/2, min/2, max/2, ceiling/1, floor/1, round/1, truncate/1]).
parse(A) ->
gleam_stdlib:parse_float(A).
@@ -33,6 +33,15 @@ min(A, B) ->
B
end.
+max(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 de9ce8b..1449d09 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, min/2]).
+-export([parse/1, to_string/1, to_base_string/2, compare/2, min/2, max/2]).
parse(A) ->
gleam_stdlib:parse_int(A).
@@ -35,3 +35,12 @@ min(A, B) ->
false ->
B
end.
+
+max(A, B) ->
+ case A > B of
+ true ->
+ A;
+
+ false ->
+ B
+ end.