Compute the absolute value of a number.

Synopsis

Declared in <folly/ConstexprMath.h>

template<typename T>
constexpr
decltype(detail::constexpr_abs_helper<T>::go(t))
constexpr_abs(T t);

Return Value

The absolute value of t.

Parameters

Name

Description

t

The value whose absolute value is computed.

Created with MrDocs