A structure to store the sine and cosine of an angle. More...
#include <trig.h>
Public Member Functions | |
Trig (Radians r) | |
Construct a Trig object from a given angle in radians. More... | |
Trig (double cos, double sin) | |
Construct a Trig object from the given cosine and sine values. More... | |
Vector2 | operator* (const Vector2 &vector) const |
Returns the vector rotated by the represented angle. More... | |
Trig | operator- () const |
Returns the Trig representing the negative version of this angle. More... | |
Vector2 | operator* (double radius) const |
Returns the corresponding point on a circle of a given |radius|. More... | |
Vector2 | operator* (const Size &ellipse_radii) const |
Returns the corresponding point on an ellipse with the given size. More... | |
Public Attributes | |
double | cos |
double | sin |
|
inlineexplicit |
Construct a Trig object from a given angle in radians.
Definition at line 18 of file trig.h.
Referenced by operator-().
|
inline |
Returns the corresponding point on an ellipse with the given size.
Definition at line 43 of file trig.h.
References cos, impeller::TSize< T >::height, sin, and impeller::TSize< T >::width.
Returns the vector rotated by the represented angle.
Definition at line 28 of file trig.h.
References cos, sin, impeller::TPoint< T >::x, and impeller::TPoint< T >::y.
|
inline |
|
inline |
double impeller::Trig::cos |
Definition at line 24 of file trig.h.
Referenced by operator*(), operator-(), and impeller::testing::TEST().
double impeller::Trig::sin |
Definition at line 25 of file trig.h.
Referenced by operator*(), operator-(), and impeller::testing::TEST().