mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 02:14:01 +00:00
Directions, the Contacts marker and panel, placed annotation labels, the drawn-line measure, the Cockpit and formatRouteDistance each chose the unit and precision on their own, and most chose before rounding: #1450, #1433 and formatDistanceText or kilometreDigits from src/data/distanceFormat.js, which cut after rounding. Each keeps its own metre step and rendering. That also fixes the 10 km cut the Contacts marker and panel, the drawn-line measure and the Cockpit still had (9,960 m read 10.0 km). The helper returns kilometres already rounded, so the plain marker and the localized panel no longer disagree on half-tenths such as 1,450 m. A negative annotation distance now leaves the label without a distance, and a drawn line with a coordinate that is not a number shows no measure, rather than printing 0 m or NaN km. The HUD altitude tag and the spoken view height keep their own unit choice.
404 B
404 B
- Show a Contacts marker 999.5 m or more away as 1.0 km. The on-globe marker chose metres before rounding, so 999.6 m read "1000 m" while the panel read "1.0 km" (Aditya, @Rohilalala, #1433).
- Distance labels share one formatter that takes each unit cut after rounding, so the Contacts panel and markers, the drawn-line measure and the Cockpit show 9.96 km as 10 km rather than 10.0 km (#1433).