Package-level declarations

Types

Link copied to clipboard
data class GeoCoordinate(val latitude: Double, val longitude: Double)

Represents a geographic coordinate pair.

Link copied to clipboard

Categories for HTTP status codes based on their numeric range.

Link copied to clipboard

Standard HTTP status codes, reason phrases, and helper functions.

Functions

Link copied to clipboard

Formats the distance between two coordinates as a human-readable string. Example: paris.distanceLabelTo(london) → "341 km"

Link copied to clipboard

Computes the Haversine great-circle distance in kilometers between two coordinates. Example: GeoCoordinate(48.8566, 2.3522).distanceTo(GeoCoordinate(51.5074, -0.1278)) → ~341.0 km

Link copied to clipboard

Returns the category title string.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns true if this coordinate is within radiusKm of other.

Link copied to clipboard

Formats a decimal latitude as a DMS string with N/S indicator. Example: 48.8566.latToDms() → "48° 51' 24\" N"

Link copied to clipboard

Formats a decimal longitude as a DMS string with E/W indicator. Example: 2.3522.lngToDms() → "2° 21' 8\" E"

Link copied to clipboard

Formats a GeoCoordinate as a decimal degrees string. Example: GeoCoordinate(48.8566, 2.3522).toDecimalDegrees() → "48.8566°N, 2.3522°E"

Link copied to clipboard

Formats a GeoCoordinate as a DMS string. Example: GeoCoordinate(48.8566, 2.3522).toDms() → "48° 51' 24\" N, 2° 21' 8\" E"

Link copied to clipboard

Parses a "lat,lng" string into a GeoCoordinate. Example: "48.8566,2.3522".toGeoCoordinate() → GeoCoordinate(48.8566, 2.3522)

Link copied to clipboard

Returns a Google Maps URL for this coordinate. Example: GeoCoordinate(48.8566, 2.3522).toGoogleMapsUrl() → "https://maps.google.com/?q=48.8566,2.3522"

Link copied to clipboard

Returns the standard reason phrase or "Unknown" for non-standard codes.

Link copied to clipboard

Returns formatted code and reason string (e.g., "404 Not Found").

Link copied to clipboard

Returns the matching HttpStatus enum entry, or null if unknown.