release: v0.17.0 (#677)

See CHANGELOG.md, section [0.17.0] — 2026-09-23.
This commit is contained in:
Ralksta
2026-09-23 12:09:08 +02:00
committed by GitHub
parent a3a6319c29
commit 89a8fac564
78 changed files with 9485 additions and 2050 deletions

View File

@@ -66,6 +66,11 @@ export function quantiseCoordinate(value: number, level: LocationPrecision): num
if (level === 'hidden') return 0;
const { step, decimals } = GRID[level];
if (step === 0) return value;
return snapToGrid(value, step, decimals);
}
/** Round to a fixed grid of `step` degrees; `decimals` trims the float tail. */
export function snapToGrid(value: number, step: number, decimals: number): number {
return Number((Math.round(value / step) * step).toFixed(decimals));
}