mp_units::quantity_point
A quantity point
Synopsis
Declared in <mp-units/framework/quantity_point.h >
template <Reference auto R,
PointOriginFor<get_quantity_spec(R)> auto PO = default_point_origin(R),
RepresentationOf<get_quantity_spec(R)> Rep = double >
class quantity_point;
Description
An absolute quantity measured from an origin.
Type Aliases
Member Functions
Static Member Functions
Name Description
is_within_bounds is_within_bounds overloads
max
min
try_make Constructs quantity_point{q, po}, or returns bounds_violation for a value that is_within_bounds rejects. The overload without an origin takes a quantity at the default origin, and the overload taking a point of another type or a point-like value constructs quantity_point{qp}.
zero
Static Data Members
Deduction Guides
Non-Member Functions
Name Description
ceilComputes the smallest quantity point with integer representation and unit type To with its number not less than qp
floorComputes the largest quantity point with integer representation and unit type To with its number not greater than qp
isfiniteDetermines if a quantity point is finite.
isinfDetermines if a quantity point is infinite.
isnanDetermines if a quantity point is a nan.
lerpLinear interpolation or extrapolation
midpointComputes the midpoint of two points
operator+Addition operator
operator+Addition operator
operator-Subtraction operator
operator-Subtraction operator
operator-Subtraction operator
operator-Subtraction operator
operator<<Stream insertion operator
operator<=>Three-way comparison operator
operator==Equality operator
roundComputes the nearest quantity point with integer representation and unit type To to qp
value_castExplicit cast of a quantity point's representation type
Template Parameters
Name Description
R a reference of the quantity point providing all information about quantity properties
PO a type that represents the origin point from which the quantity point is measured from
Rep a type to be used to represent values of a quantity point