Files
allwpilib/wpimath/src/main/python/semiwrap/Rotation2d.yml

57 lines
1.3 KiB
YAML
Raw Normal View History

extra_includes:
- geometryToString.h
- wpystruct.h
functions:
to_json:
ignore: true
from_json:
ignore: true
classes:
2025-11-07 20:00:05 -05:00
wpi::math::Rotation2d:
methods:
Rotation2d:
overloads:
'':
auto:
doc: |
Constructs a Rotation2d with the given radian value.
:param value: The value of the angle in radians.
param_override:
value:
2025-11-07 20:00:05 -05:00
x_type: wpi::units::radian_t
template_impls:
2025-11-07 20:00:05 -05:00
- [wpi::units::radian_t]
double, double:
const Eigen::Matrix2d&:
rename: fromMatrix
keepalive: []
RotateBy:
ToMatrix:
Radians:
Degrees:
Cos:
Sin:
Tan:
operator+:
operator-:
overloads:
const Rotation2d& [const]:
'[const]':
operator*:
operator/:
operator==:
RelativeTo:
inline_code: |
cls_Rotation2d
2025-11-07 20:00:05 -05:00
.def_static("fromDegrees", [](wpi::units::degree_t value) {
return std::make_unique<Rotation2d>(value);
}, py::arg("value"))
2025-11-07 20:00:05 -05:00
.def_static("fromRotations", [](wpi::units::turn_t value) {
return std::make_unique<Rotation2d>(value);
})
.def("__repr__", py::overload_cast<const Rotation2d&>(&rpy::toString));
2025-11-07 20:00:05 -05:00
SetupWPyStruct<wpi::math::Rotation2d>(cls_Rotation2d);