R2::basic_rotation
namespace nin::R2 {
template <std::floating_point T>
class basic_rotation;
}
A 2D rotation stored as an angle quantity.
Unlike basic_orientation_qty,
a rotation can span multiple full turns.
Trigonometric values are cached and recomputed lazily when the angle changes.
Member functions
(Constructor)
constructs a 2D rotation
(Constructor)
constructs a 2D rotation
|
(1) |
|
(2) |
|
(3) |
|
(4) |
-
(1) Default constructor. Zero rotation.
-
(2) Explicit converting constructor from a different floating-point type.
-
(3) Constructs from an angle.
-
(4) Constructs the rotation that maps
referencetomeasure, plusrevolutionsfull turns.
invert
negates the rotation angle in place
invert
negates the rotation angle in place
|
(1) |
angle
rotation angle accessor
angle
rotation angle accessor
|
(1) |
|
(2) |
-
(1) Returns the current angle.
-
(2) Returns a mutable reference. Modifying it invalidates the cache.
operator()
applies the rotation
operator()
applies the rotation
|
(1) |
|
(2) |
|
(3) |
-
(1) Rotates a 2-element container of raw scalars.
-
(2) Rotates an orientation quantity.
-
(3) Rotates a position quantity.