use lodash-es everywhere, replace custom clamp methods with lodash

This commit is contained in:
Martin Raifer
2025-04-21 14:43:35 +02:00
parent 4254e67ca7
commit aa96a67c65
12 changed files with 15 additions and 28 deletions
+2 -4
View File
@@ -1,3 +1,5 @@
import { clamp } from 'lodash-es';
import { t, localizer } from '../core/localizer';
var OSM_PRECISION = 7;
@@ -102,10 +104,6 @@ function wrap(x, min, max) {
return ((x - min) % d + d) % d + min;
}
function clamp(x, min, max) {
return Math.max(min, Math.min(x, max));
}
function roundToDecimal (target, decimalPlace) {
target = Number(target);
decimalPlace = Number(decimalPlace);