Skip to content

Commit

Permalink
Added a comment about GISTool.equalityDelta
Browse files Browse the repository at this point in the history
  • Loading branch information
trasch committed Jul 2, 2024
1 parent 258579e commit 1a57d88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GIS tools for Swift, including a [GeoJSON][3] implementation and many algorithms

## Notes

This package makes some assumptions about what is equal, i.e. coordinates that are inside of `1e-10` degrees are regarded as equal. See [GISTool.equalityDelta][5].
This package makes some assumptions about what is equal, i.e. coordinates that are inside of `1e-10` degrees are regarded as equal (that's μm precision and is probably overkill). See [GISTool.equalityDelta][5].

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion Sources/GISTools/GISTool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public enum GISTool {
/// Mercator projection origin shift.
public static let originShift = 2.0 * Double.pi * GISTool.equatorialRadius / 2.0 // 20037508.342789244

/// The accuracy for testing what is equal.
/// The accuracy for testing what is equal (μm precision, mainly to counter small rounding errors).
public static let equalityDelta: Double = 1e-10

/// The length in pixels of a map tile.
Expand Down

0 comments on commit 1a57d88

Please sign in to comment.