Skip to content

Commit 205c27f

Browse files
committed
fix(Crs): correctly renamed reasonableEpsilon function
BREAKING CHANGE: CRS.reasonnableEspsilon renamed to CRS.reasonableEpsilon
1 parent d467a29 commit 205c27f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Core/Geographic/Crs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,12 @@ export function isValid(crs: ProjectionLike) {
177177
}
178178

179179
/**
180-
* Gives a reasonnable epsilon for this CRS.
180+
* Gives a reasonable epsilon for this CRS.
181181
*
182182
* @param crs - The CRS to use.
183183
* @returns 0.01 if the CRS is EPSG:4326, 0.001 otherwise.
184184
*/
185-
export function reasonnableEpsilon(crs: ProjectionLike) {
185+
export function reasonableEpsilon(crs: ProjectionLike) {
186186
if (is4326(crs)) {
187187
return 0.01;
188188
} else {

src/Core/Geographic/Extent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class Extent {
234234
*/
235235
isInside(extent, epsilon) {
236236
extent.as(this.crs, _extent);
237-
epsilon = epsilon == undefined ? CRS.reasonnableEpsilon(this.crs) : epsilon;
237+
epsilon = epsilon ?? CRS.reasonableEpsilon(this.crs);
238238
return this.east - _extent.east <= epsilon &&
239239
_extent.west - this.west <= epsilon &&
240240
this.north - _extent.north <= epsilon &&

test/unit/crs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ describe('CRS assertions', function () {
4949
assert.ok(!CRS.isGeocentric('EPSG:3857'));
5050
});
5151

52-
it('should return a reasonnable epsilon', function () {
53-
assert.strictEqual(CRS.reasonnableEpsilon('EPSG:4326'), 0.01);
54-
assert.strictEqual(CRS.reasonnableEpsilon('EPSG:3857'), 0.001);
52+
it('should return a reasonable epsilon', function () {
53+
assert.strictEqual(CRS.reasonableEpsilon('EPSG:4326'), 0.01);
54+
assert.strictEqual(CRS.reasonableEpsilon('EPSG:3857'), 0.001);
5555
});
5656
});

0 commit comments

Comments
 (0)