We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 64206d5 + 38a86e5 commit c97d0cdCopy full SHA for c97d0cd
common/src/main/kotlin/com/lambda/interaction/request/rotation/visibilty/PlaceDirection.kt
@@ -129,6 +129,11 @@ enum class PlaceDirection(
129
* @return The calculated pitch value
130
*/
131
private fun calculateHorizontalPitch(currentPitch: Double, boundaryValue: Double): Double {
132
+ // Handle extreme pitch values (-90 or 90) by returning 0
133
+ if (abs(currentPitch) >= 90.0 - 0.1) {
134
+ return 0.0
135
+ }
136
+
137
val isWithinPositiveBoundary = abs(currentPitch - boundaryValue) < abs(currentPitch - (-boundaryValue))
138
return if (isWithinPositiveBoundary) boundaryValue else -boundaryValue
139
}
0 commit comments