func abs<T where T : FloatingPoint, T.Magnitude == T>(_: T)
Returns the absolute value of x
.
Declaration
func
abs
<
T
where
T
:
FloatingPoint
,
T
.
Magnitude
==
T
>
(
_
x
:
T
) -
>
T
Returns the absolute value of
x
.Concrete instances of
SignedNumber
can specialize this function by conforming toAbsoluteValuable
.Declaration
func
abs
<
T
where
T
:
SignedNumber
>
(
_
x
:
T
) -
>
T