[wpimath] Add Rotation2d.fromRadians factory (#4178)

This commit is contained in:
Starlight220
2022-04-30 10:19:29 +03:00
committed by GitHub
parent 4f79ceedd9
commit 18ff694f02
2 changed files with 12 additions and 2 deletions

View File

@@ -15,8 +15,8 @@ class Rotation2dTest {
@Test
void testRadiansToDegrees() {
var rot1 = new Rotation2d(Math.PI / 3);
var rot2 = new Rotation2d(Math.PI / 4);
var rot1 = Rotation2d.fromRadians(Math.PI / 3);
var rot2 = Rotation2d.fromRadians(Math.PI / 4);
assertAll(
() -> assertEquals(rot1.getDegrees(), 60.0, kEpsilon),