127 constexpr units::radian_t
Radians()
const {
return m_value; }
135 constexpr units::degree_t
Degrees()
const {
return m_value; }
142 constexpr double Cos()
const {
return m_cos; }
149 constexpr double Sin()
const {
return m_sin; }
156 constexpr double Tan()
const {
return Sin() / Cos(); }
159 units::radian_t m_value = 0_rad;
#define WPILIB_DLLEXPORT
Definition: SymbolExports.h:36
a class to store JSON values
Definition: json.h:96
A rotation in a 2D coordinate frame represented by a point on the unit circle (cosine and sine).
Definition: Rotation2d.h:23
constexpr double Tan() const
Returns the tangent of the rotation.
Definition: Rotation2d.h:156
constexpr units::degree_t Degrees() const
Returns the degree value of the rotation.
Definition: Rotation2d.h:135
constexpr double Cos() const
Returns the cosine of the rotation.
Definition: Rotation2d.h:142
constexpr Rotation2d()=default
Constructs a Rotation2d with a default angle of 0 degrees.
constexpr double Sin() const
Returns the sine of the rotation.
Definition: Rotation2d.h:149
constexpr units::radian_t Radians() const
Returns the radian value of the rotation.
Definition: Rotation2d.h:127
Definition: AprilTagPoseEstimator.h:15
WPILIB_DLLEXPORT void from_json(const wpi::json &json, AprilTagFieldLayout &layout)
WPILIB_DLLEXPORT void to_json(wpi::json &json, const AprilTagFieldLayout &layout)
bool operator==(const Value &lhs, const Value &rhs)
base_unit< detail::meter_ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > angle_unit
Represents an SI base unit of angle.
Definition: base.h:798
unit< std::ratio< 1 >, units::category::scalar_unit > scalar
Definition: base.h:2510
constexpr dimensionless::scalar_t operator/(const UnitTypeLhs &lhs, const UnitTypeRhs &rhs) noexcept
Division for convertible unit_t types with a linear scale.
Definition: base.h:2644
constexpr unit_t< Units, T, NonLinearScale > operator-(const unit_t< Units, T, NonLinearScale > &u) noexcept
Definition: base.h:2352
constexpr unit_t< Units, T, NonLinearScale > operator+(const unit_t< Units, T, NonLinearScale > &u) noexcept
Definition: base.h:2328
constexpr auto operator*(const UnitTypeLhs &lhs, const UnitTypeRhs &rhs) noexcept -> unit_t< compound_unit< squared< typename units::traits::unit_t_traits< UnitTypeLhs >::unit_type > > >
Multiplication type for convertible unit_t types with a linear scale.
Definition: base.h:2588