Skip to content

Commit

Permalink
fix(Crs): correctly renamed reasonableEpsilon function
Browse files Browse the repository at this point in the history
  • Loading branch information
Desplandis committed Nov 16, 2024
1 parent 80ea9ff commit 69e8bd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Core/Geographic/Crs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@ export function isValid(crs: ProjectionLike) {
}

/**
* Gives a reasonnable epsilon for this CRS.
* Gives a reasonable epsilon for this CRS.
*
* @param crs - The CRS to use.
* @returns 0.01 if the CRS is EPSG:4326, 0.001 otherwise.
*/
export function reasonnableEpsilon(crs: ProjectionLike) {
export function reasonableEpsilon(crs: ProjectionLike) {
if (is4326(crs)) {
return 0.01;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Geographic/Extent.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class Extent {
*/
isInside(extent, epsilon) {
extent.as(this.crs, _extent);
epsilon = epsilon == undefined ? CRS.reasonnableEpsilon(this.crs) : epsilon;
epsilon = epsilon ?? CRS.reasonableEpsilon(this.crs);
return this.east - _extent.east <= epsilon &&
_extent.west - this.west <= epsilon &&
this.north - _extent.north <= epsilon &&
Expand Down

0 comments on commit 69e8bd7

Please sign in to comment.