|
| constexpr | Point () noexcept=default |
| | Constructs the origin (0 m, 0 m).
|
| | Point (Length x, Length y) noexcept |
| | Constructs a point from Cartesian components.
|
| | Point (Length magnitude, const Rotation &rotation) noexcept |
| | Constructs a point from polar form.
|
| Length | X () const noexcept |
| | X coordinate.
|
| Length | Y () const noexcept |
| | Y coordinate.
|
| Point | operator+ (const Point &rhs) const noexcept |
| | Vector addition.
|
| Point | operator- (const Point &rhs) const noexcept |
| | Vector subtraction.
|
| Point | operator- () const noexcept |
| | Unary negation.
|
| Point | operator* (double scalar) const noexcept |
| | Scales both components by a unitless scalar.
|
| Point | operator/ (double scalar) const noexcept |
| | Divides both components by a unitless scalar.
|
| Angle | theta () const noexcept |
| | Direction (heading) of the vector in radians.
|
| Length | mag () const noexcept |
| | Magnitude (Euclidean norm).
|
| Length | distTo (const Point &rhs) const noexcept |
| | Euclidean distance to another point.
|
| Angle | angleTo (const Point &rhs) const noexcept |
| | Signed smallest-angle direction from this point’s heading to another’s.
|
| Area | dot (const Point &rhs) const noexcept |
| | Dot (inner) product.
|
| Area | wedge (const Point &rhs) const noexcept |
| | 2D wedge (scalar cross) product.
|
| Point | project (const Point &rhs) const noexcept |
| | Projection of this vector onto another.
|
| Point | rotateBy (const Rotation &rhs) const noexcept |
| | Rotates this point by a Rotation about the origin.
|
| bool | isApprox (const Point &rhs) const noexcept |
| | Approximate equality in Euclidean metric.
|
Immutable 2D point / vector with unit-safe Cartesian coordinates.
Point stores an (x, y) position in meters and provides common vector operations (addition, subtraction, scaling, dot / wedge products, projection), geometric queries (magnitude, direction, distance, angles), and rotation by a Rotation.
All operations preserve units via au quantities. Overloads that take double scalars are unitless multipliers/divisors applied to the coordinates.
| Area rz::Point::wedge |
( |
const Point & | rhs | ) |
const |
|
noexcept |
2D wedge (scalar cross) product.
Equivalent to the signed z-component of the 3D cross product of (x, y, 0) × (rhs.x, rhs.y, 0): x*rhs.y - y*rhs.x.
Positive if rhs is counter-clockwise from this vector.
- Parameters
-
- Returns
- Signed area (units: m²).