A C++ template library for embedded applications
Designed and maintained by
Aster Consulting Ltd
Join the ETL community
MIT licensed

absolute

A template function that returns the absolute value.

The function has two variants; one for signed and one for unsigned types.
The unsigned variant merely returns the parameter value.
The variant is chosen at compile time according to the parameter type.
____________________________________________________________________________________________________
template <typename T>
T absolute(T value)
absolute.h