Returns the greatest argument passed.
If there are multiple equal greatest arguments, returns the last one.
Declaration
func
max
<
T
:
Comparable
>
(
x
:
T
,
_
y
:
T
,
_
z
:
T
,
_
rest
:
T
...) -
>
T
Auto-generated documentation for Swift. Command-click no more.
Returns the greatest argument passed.
If there are multiple equal greatest arguments, returns the last one.
func
max
<
T
:
Comparable
>
(
x
:
T
,
_
y
:
T
,
_
z
:
T
,
_
rest
:
T
...) -
>
T
Returns the greater of
x
andy
.If
x == y
, returnsy
.Declaration
func
max
<
T
:
Comparable
>
(
x
:
T
,
_
y
:
T
) -
>
T