mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-28 10:51:45 +02:00
use lodash-es everywhere, replace custom clamp methods with lodash
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user