Returns the epsilon of the quantity

Synopsis

Declared in <mp‐units/math.h>

template<
    typename Rep,
    Reference R>
requires RepresentationOf<Rep, get_quantity_spec(R{})> && requires { std::numeric_limits<Rep>::epsilon(); }
[[deprecated("2.5.0: Use `std::numeric_limits<Quantity>::epsilon()` instead"), nodiscard]]
constexpr
quantity<R{}, Rep>
epsilon(R r) noexcept;
Warning

Deprecated: 2.5.0: Use `std::numeric_limits<Quantity>::epsilon()` instead. Use of this entity is allowed but discouraged.

Description

The returned value is defined by a std::numeric_limits<typename Q::rep>::epsilon().

Return Value

Quantity The epsilon value for quantity's representation type

Note

The return value should not be discarded.

Template Parameters

Name

Description

Q

Quantity type being the base of the operation

Parameters

Name

Description

r

the reference (unit and quantity spec) to compute the epsilon for

Created with MrDocs