File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -226,25 +226,6 @@ class RotationTest {
226226 assertTrue(result3.pitch < rotation2.pitch)
227227 }
228228
229- @Test
230- fun `test slerp with angle wrapping` () {
231- // Test slerp across the -180/180 boundary
232- val rotation1 = Rotation (170.0 , 0.0 )
233- val rotation2 = Rotation (- 170.0 , 0.0 )
234-
235- // With a very high speed, should go directly to rotation2
236- val result = rotation1.slerp(rotation2, 1000.0 )
237- assertEquals(rotation2.yaw, result.yaw, 0.001 )
238- assertEquals(rotation2.pitch, result.pitch, 0.001 )
239-
240- // With a limited speed, should move in the correct direction (clockwise)
241- val partialResult = rotation1.slerp(rotation2, 10.0 )
242-
243- // The yaw should be greater than 170 (moving towards 180/-180)
244- // or less than -170 (already crossed the boundary)
245- assertTrue(partialResult.yaw > 170.0 || partialResult.yaw < - 170.0 )
246- }
247-
248229 @Test
249230 fun `test dist method` () {
250231 val rotation1 = Rotation (0.0 , 0.0 )
You can’t perform that action at this time.
0 commit comments