MCPcopy Create free account
hub / github.com/comaps/comaps / Abs

Function Abs

libs/base/math.hpp:30–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29template <typename T>
30T Abs(T x)
31{
32 static_assert(std::is_signed<T>::value, "");
33 return (x < 0 ? -x : x);
34}
35
36template <typename Number, typename EnableIf = typename std::enable_if_t<
37 std::is_integral_v<Number> || std::is_floating_point_v<Number>, void>>

Callers 5

CalculateAreaMethod · 0.85
ToCellIdMethod · 0.85
EqualMethod · 0.85
AlmostEqualULPsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected