mp_units::quantity_point::quantity_from

quantity_from overloads

Synopses

Declared in <mp-units/framework/quantity_point.h>

Returns the quantity separating this quantity point from a given point origin.

template<PointOrigin PO2>
requires requires(const quantity_point qp) { qp - PO2{}; }
[[nodiscard]]
constexpr
Quantity auto
quantity_from(PO2 po) const;
» more...

Returns the quantity separating this quantity point from another quantity point.

template<QuantityPointOf<absolute_point_origin> QP>
[[nodiscard]]
constexpr
Quantity auto
quantity_from(QP const& qp) const;
» more...

Return Value

  • The result of *this - po.
  • The result of *this - qp.

NOTE

The return value should not be discarded.

Parameters

NameDescription
pothe point origin to measure the offset from
qpthe quantity point to measure the offset from