File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 1717
1818import com.lambda.interaction.request.rotation.Rotation
1919import com.lambda.interaction.request.rotation.visibilty.PlaceDirection
20- import kotlin.math.abs
21- import kotlin.math.atan
22- import kotlin.math.cos
23- import kotlin.math.sin
2420import kotlin.test.Test
2521import kotlin.test.assertEquals
26- import kotlin.test.assertTrue
2722import kotlin.test.assertFalse
23+ import kotlin.test.assertTrue
2824
2925/* *
3026 * Tests for the PlaceDirection class
@@ -179,6 +175,16 @@ class PlaceDirectionTest {
179175 assertEquals(direction, PlaceDirection .fromRotation(snapped))
180176 }
181177
178+ @Test
179+ fun `test yaw and pitch snapping for East direction` () {
180+ val direction = PlaceDirection .East
181+ val rot = Rotation (0.0 , - 90.0 )
182+ val snapped = direction.snapToArea(rot)
183+
184+ // Verify that the yaw and pitch are snapped to the boundary
185+ assertEquals(direction, PlaceDirection .fromRotation(snapped))
186+ }
187+
182188 // Tests for when rotation is already in the area
183189
184190 @Test
You can’t perform that action at this time.
0 commit comments