R2::basic_position_qty
namespace nin::R2 {
template <std::floating_point T>
struct basic_position_qty;
}
A 2D position quantity with length-dimensioned components.
The two public fields x and y are units::length_v<T> quantities.
basic_position_qty satisfies the container interface: it is iterable,
indexable, and reports a fixed size() of 2.
Nested types
| Type | Definition |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
forward iterator over components |
|
const forward iterator over components |
Member functions
(Constructor)
constructs a 2D position
(Constructor)
constructs a 2D position
|
(1) |
Default-constructs both components to zero length.
operator[]
indexed access to components
operator[]
indexed access to components
|
(1) |
|
(2) |
Index 0 returns x, index 1 returns y.
begin, end, cbegin, cend
iterators
begin, end, cbegin, cend
iterators
|
(1) |
|
(2) |
|
(3) |
|
(4) |
|
(5) |
|
(6) |
Forward iterators over the two components.
size, max_size, empty
container capacity
size, max_size, empty
container capacity
|
(1) |
|
(2) |
|
(3) |
-
(1)-(2) Returns 2.
-
(3) Returns
false.
operator==
equality comparison
operator==
equality comparison
|
(1) |
Defaulted member-wise comparison.