Skip to content

Commit 1259d05

Browse files
auscompgeekvirtuald
authored andcommitted
wpimath: Add Rotation2d.fromRotations
1 parent 7a200aa commit 1259d05

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

subprojects/robotpy-wpimath/gen/geometry/Rotation2d.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ inline_code: |
4242
.def_static("fromDegrees", [](units::degree_t value) {
4343
return std::make_unique<Rotation2d>(value);
4444
}, py::arg("value"))
45+
.def_static("fromRotations", [](units::turn_t value) {
46+
return std::make_unique<Rotation2d>(value);
47+
})
4548
.def("__repr__", py::overload_cast<const Rotation2d&>(&rpy::toString));
4649
4750
SetupWPyStruct<frc::Rotation2d>(cls_Rotation2d);

0 commit comments

Comments
 (0)