absUnsign

Returns the absolute value of x converted to the corresponding unsigned type.

absUnsign
(
T
)
(
T x
)

Parameters

x T

The integral value to return the absolute value of.

Return Value

Type: Unsigned!T

The absolute value of x.

Examples

assert((-1).absUnsign == 1);
assert(1.absUnsign == 1);

Meta