2-D positional data structure. More...
#include <Position.hpp>
Public Attributes | |
Length2 | linear |
Linear position. | |
Angle | angular |
Angular position. | |
Related Functions | |
(Note that these are not member functions.) | |
constexpr bool | operator== (const Position &lhs, const Position &rhs) |
Equality operator. | |
constexpr bool | operator!= (const Position &lhs, const Position &rhs) |
Inequality operator. | |
constexpr Position | operator- (const Position &value) |
Negation operator. | |
constexpr Position | operator+ (const Position &value) |
Positive operator. | |
constexpr Position & | operator+= (Position &lhs, const Position &rhs) |
Addition assignment operator. | |
constexpr Position | operator+ (const Position &lhs, const Position &rhs) |
Addition operator. | |
constexpr Position & | operator-= (Position &lhs, const Position &rhs) |
Subtraction assignment operator. | |
constexpr Position | operator- (const Position &lhs, const Position &rhs) |
Subtraction operator. | |
constexpr Position | operator* (const Real scalar, const Position &pos) |
Multiplication operator. | |
template<> | |
constexpr bool | IsValid (const d2::Position &value) noexcept |
Determines if the given value is valid. | |
constexpr Position | GetPosition (const Position pos0, const Position pos1, const Real beta) noexcept |
Gets the position between two positions at a given unit interval. More... | |
2-D positional data structure.
A 2-element length and angle pair suitable for representing a linear and angular position in 2-D.
|
related |
Gets the position between two positions at a given unit interval.
pos0 | Position at unit interval value of 0. |
pos1 | Position at unit interval value of 1. |
beta | Unit interval (value between 0 and 1) of travel between position 0 and position 1. |
pos0 == pos1
or beta == 0
, position 1 if beta == 1
, or at the given unit interval value between position 0 and position 1.