RaidZeroLib
Coroutine robot framework for VEX V5
Toggle main menu visibility
Loading...
Searching...
No Matches
Rotation.hpp
1
#pragma once
2
#include "RaidZeroLib/api/Units/Units.hpp"
3
4
namespace
rz
{
5
16
class
Rotation
{
17
public
:
23
constexpr
Rotation
() noexcept = default;
24
30
explicit
Rotation
(
Angle
theta) noexcept;
31
41
Rotation
(
Length
x,
Length
y) noexcept;
42
52
Rotation
(
double
x,
double
y) noexcept;
53
59
Angle
Theta
() const noexcept;
60
66
double
Sin
() const noexcept;
67
73
double
Cos
() const noexcept;
74
80
double
Tan
() const noexcept;
81
88
Rotation
operator+(const
Rotation
& rhs) const noexcept;
89
96
Rotation
operator-(const
Rotation
& rhs) const noexcept;
97
101
Rotation
& operator+=(const
Rotation
& rhs) noexcept;
102
106
Rotation
& operator-=(const
Rotation
& rhs) noexcept;
107
113
Rotation
operator-() const noexcept;
114
121
Rotation
operator*(
double
scalar) const noexcept;
122
131
Rotation
operator/(
double
scalar) const noexcept;
132
142
bool
isApprox
(const
Rotation
& rhs) const noexcept;
143
144
private:
145
Angle
theta = au::ZERO;
146
};
147
148
}
// namespace rz
rz::Rotation::Theta
Angle Theta() const noexcept
Returns the normalized angle in radians.
rz::Rotation::isApprox
bool isApprox(const Rotation &rhs) const noexcept
Approximate equality check with angular tolerance.
rz::Rotation::Rotation
constexpr Rotation() noexcept=default
Constructs a zero rotation.
rz::Rotation::Tan
double Tan() const noexcept
Tangent of the rotation.
rz::Rotation::Sin
double Sin() const noexcept
Sine of the rotation.
rz::Rotation::Cos
double Cos() const noexcept
Cosine of the rotation.
rz::Angle
au::QuantityD< au::Radians > Angle
Definition
Units.hpp:13
rz::Length
au::QuantityD< au::Meters > Length
Definition
Units.hpp:9
rz
Definition
DriverControl.hpp:11
RaidZeroLib
api
Geometry
Rotation.hpp
Generated by
1.18.0