[#mp_units-quantity_point-08] = xref:mp_units.adoc[mp_units]::quantity_point :relfileprefix: ../ :mrdocs: A quantity point == Synopsis Declared in `<mp‐units/framework/quantity_point.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/Reference-0ba.adoc[Reference] auto R, xref:mp_units/PointOriginFor.adoc[PointOriginFor<get_quantity_spec(R)>] auto PO = default_point_origin(R), xref:mp_units/RepresentationOf.adoc[RepresentationOf<get_quantity_spec(R)>] Rep = double> class quantity_point : public /* implementation-defined */ ---- == Description An absolute quantity measured from an origin. == Base Classes [cols="1,4"] |=== | Name| Description | `/* implementation-defined */` | |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:mp_units/quantity_point-08/quantity_type.adoc[`quantity_type`] | The `quantity` type used to store the offset of this quantity point from `point_origin`. | xref:mp_units/quantity_point-08/rep.adoc[`rep`] | The type used to represent the numerical value of the quantity point. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:mp_units/quantity_point-08/2constructor-075.adoc[`quantity_point`] [.small]#[constructor]# | Constructors | xref:mp_units/quantity_point-08/force_in-03.adoc[`force_in`] [.small]#[deprecated]# | `force_in` overloads | xref:mp_units/quantity_point-08/force_numerical_value_in.adoc[`force_numerical_value_in`] [.small]#[deprecated]# | Deprecated. Returns the numerical value of this quantity point on the scale of another unit, truncating if inexact. | xref:mp_units/quantity_point-08/in-0acd.adoc[`in`] | `in` overloads | xref:mp_units/quantity_point-08/numerical_value_in-08.adoc[`numerical_value_in`] | `numerical_value_in` overloads | xref:mp_units/quantity_point-08/operator_inc-0d.adoc[`operator++`] | Increment operators | xref:mp_units/quantity_point-08/operator_plus_eq.adoc[`operator+=`] | Adds a quantity to the underlying quantity from the origin and assigns the result to `*this`. | xref:mp_units/quantity_point-08/operator_dec-0f.adoc[`operator‐‐`] | Decrement operators | xref:mp_units/quantity_point-08/operator_minus_eq.adoc[`operator‐=`] | Subtracts a quantity from the underlying quantity from the origin and assigns the result to `*this`. | xref:mp_units/quantity_point-08/point_for-0e.adoc[`point_for`] | `point_for` overloads | xref:mp_units/quantity_point-08/quantity_from-00.adoc[`quantity_from`] | `quantity_from` overloads | xref:mp_units/quantity_point-08/quantity_from_zero.adoc[`quantity_from_zero`] | Returns the quantity separating this quantity point from the zero of its default point origin. | xref:mp_units/quantity_point-08/quantity_ref_from-05.adoc[`quantity_ref_from`] | `quantity_ref_from` overloads | xref:mp_units/quantity_point-08/2conversion-00.adoc[`operator QP_`] | Conversion operators |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:mp_units/quantity_point-08/max.adoc[`max`] | Returns the largest representable quantity point, honoring the point origin's bounds policy. | xref:mp_units/quantity_point-08/min.adoc[`min`] | Returns the smallest representable quantity point, honoring the point origin's bounds policy. | xref:mp_units/quantity_point-08/zero.adoc[`zero`] | Returns a quantity point at `point_origin`, holding the representation type's zero value. |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:mp_units/quantity_point-08/quantity_from_origin_is_an_implementation_detail_.adoc[`quantity_from_origin_is_an_implementation_detail_`] | needs to be public for a structural type |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:mp_units/quantity_point-08/absolute_point_origin.adoc[`absolute_point_origin`] | The absolute point origin underlying `point_origin` ‐ `point_origin` itself if it already is one, otherwise the absolute origin reached by following its chain of relative point origins. | xref:mp_units/quantity_point-08/character.adoc[`character`] | The quantity character (tensor order and numeric field) extracted from `quantity_spec`. | xref:mp_units/quantity_point-08/dimension.adoc[`dimension`] | The dimension extracted from `quantity_spec`. | xref:mp_units/quantity_point-08/point_origin.adoc[`point_origin`] | The point origin of this quantity point, as provided via the `PO` template parameter. | xref:mp_units/quantity_point-08/quantity_spec.adoc[`quantity_spec`] | The quantity specification extracted from `reference`. | xref:mp_units/quantity_point-08/reference.adoc[`reference`] | The reference of the quantity point, as provided via the `R` template parameter. | xref:mp_units/quantity_point-08/unit.adoc[`unit`] | The unit extracted from `reference`. |=== == Deduction Guides [cols="1,4"] |=== | Name| Description | xref:mp_units/quantity_point-0c5.adoc[`quantity_point<Q::reference, PO{}, Q::rep>`] | Deduces a `quantity_point` from a quantity and an explicit point origin. | xref:mp_units/quantity_point-04.adoc[`quantity_point<Q::reference, default_point_origin(Q::reference), Q::rep>`] | Deduces a `quantity_point` from a quantity alone, using the default point origin for its reference. | xref:mp_units/quantity_point-0cb.adoc[`quantity_point<quantity_point_like_traits<QP>::reference, quantity_point_like_traits<QP>::point_origin, quantity_point_like_traits<QP>::rep>`] | Deduces a `quantity_point` from an external quantity‐point‐like type via `quantity_point_like_traits`. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:mp_units/absolute.adoc[`absolute`] | Constructs a `quantity_point` of reference `R` from a raw representation value | xref:mp_units/ceil-0e.adoc[`ceil`] | Computes the smallest quantity point with integer representation and unit type To with its number not less than qp | xref:mp_units/floor-0f.adoc[`floor`] | Computes the largest quantity point with integer representation and unit type To with its number not greater than qp | xref:mp_units/isfinite-0d.adoc[`isfinite`] | Determines if a quantity point is finite. | xref:mp_units/isinf-0f.adoc[`isinf`] | Determines if a quantity point is infinite. | xref:mp_units/isnan-09.adoc[`isnan`] | Determines if a quantity point is a nan. | xref:mp_units/lerp.adoc[`lerp`] | Linear interpolation or extrapolation | xref:mp_units/midpoint.adoc[`midpoint`] | Computes the midpoint of two points | xref:mp_units/point.adoc[`point`] | Constructs a `quantity_point` of reference `R` from a raw representation value | xref:mp_units/round-0c.adoc[`round`] | Computes the nearest quantity point with integer representation and unit type `To` to `qp` | xref:mp_units/value_cast-0c.adoc[`value_cast`] | Explicit cast of a quantity point's representation type |=== == Template Parameters [cols="1,4"] |=== | 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 |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#