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

Function Sign

libs/base/math.hpp:38–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36template <typename Number, typename EnableIf = typename std::enable_if_t<
37 std::is_integral_v<Number> || std::is_floating_point_v<Number>, void>>
38int constexpr Sign(Number const number) noexcept
39{
40 return number == 0 ? 0 : number > 0 ? 1 : -1;
41}
42} // namespace math
43
44// Compare floats or doubles for almost equality.

Callers 2

FirstCoordinateFromXMLFunction · 0.85
UNIT_TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

UNIT_TESTFunction · 0.68