fix(ViewportOrientationMarkers): round rotation to fix floating point issue (#5135)

Co-authored-by: Joe Boccanfuso <109477394+jbocce@users.noreply.github.com>
This commit is contained in:
Patrick Wespi 2025-07-23 18:10:49 +02:00 committed by GitHub
parent 04a599962d
commit bd3ff5f57c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -198,6 +198,9 @@ function _getOrientationMarkers(rowCosines, columnCosines, rotation, flipVertica
const oppositeRowString = invertOrientationStringLPS(rowString);
const oppositeColumnString = invertOrientationStringLPS(columnString);
// Round to 4 decimal places (after rotate right 3 times and flip horizontally -> rotation is 90.00000000000001)
rotation = Math.round(rotation * 10000) / 10000;
const markers = {
top: oppositeColumnString,
left: oppositeRowString,