diff --git a/modules/geo/geo.js b/modules/geo/geo.js index e0f7aa436..639887bac 100644 --- a/modules/geo/geo.js +++ b/modules/geo/geo.js @@ -1,16 +1,3 @@ -import _every from 'lodash-es/every'; -import _some from 'lodash-es/some'; - -import { - geoVecAngle, - geoVecCross, - geoVecDot, - geoVecInterp, - geoVecLength, - geoVecSubtract -} from './vector.js'; - - // constants var TAU = 2 * Math.PI; var EQUATORIAL_RADIUS = 6356752.314245179; diff --git a/modules/geo/geom.js b/modules/geo/geom.js index fef500eb6..e8b37c6fe 100644 --- a/modules/geo/geom.js +++ b/modules/geo/geom.js @@ -25,7 +25,7 @@ export function geoEdgeEqual(a, b) { // Rotate all points counterclockwise around a pivot point by given angle export function geoRotate(points, angle, around) { return points.map(function(point) { - var radial = [point[0] - around[0], point[1] - around[1]]; + var radial = geoVecSubtract(point, around); return [ radial[0] * Math.cos(angle) - radial[1] * Math.sin(angle) + around[0], radial[0] * Math.sin(angle) + radial[1] * Math.cos(angle) + around[1]