mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[wpilibc] Remove deprecated Joystick angle functions (#6569)
This commit is contained in:
@@ -122,16 +122,6 @@ double Joystick::GetMagnitude() const {
|
||||
return std::hypot(GetX(), GetY());
|
||||
}
|
||||
|
||||
double Joystick::GetDirectionRadians() const {
|
||||
return std::atan2(GetX(), -GetY());
|
||||
}
|
||||
|
||||
double Joystick::GetDirectionDegrees() const {
|
||||
WPI_IGNORE_DEPRECATED
|
||||
return (180 / std::numbers::pi) * GetDirectionRadians();
|
||||
WPI_UNIGNORE_DEPRECATED
|
||||
}
|
||||
|
||||
units::radian_t Joystick::GetDirection() const {
|
||||
return units::math::atan2(units::dimensionless::scalar_t{GetX()},
|
||||
units::dimensionless::scalar_t{-GetY()});
|
||||
|
||||
@@ -251,26 +251,6 @@ class Joystick : public GenericHID {
|
||||
*/
|
||||
double GetMagnitude() const;
|
||||
|
||||
/**
|
||||
* Get the direction of the vector formed by the joystick and its origin
|
||||
* in radians.
|
||||
*
|
||||
* @return The direction of the vector in radians
|
||||
* @deprecated Use GetDirection() instead.
|
||||
*/
|
||||
[[deprecated("Use GetDirection() instead.")]]
|
||||
double GetDirectionRadians() const;
|
||||
|
||||
/**
|
||||
* Get the direction of the vector formed by the joystick and its origin
|
||||
* in degrees.
|
||||
*
|
||||
* @return The direction of the vector in degrees
|
||||
* @deprecated Use GetDirection() instead.
|
||||
*/
|
||||
[[deprecated("Use GetDirection() instead.")]]
|
||||
double GetDirectionDegrees() const;
|
||||
|
||||
/**
|
||||
* Get the direction of the vector formed by the joystick and its origin.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user