Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oleander/coordinate-swift
A Swift library for handling coordinates
https://github.com/oleander/coordinate-swift
Last synced: 4 days ago
JSON representation
A Swift library for handling coordinates
- Host: GitHub
- URL: https://github.com/oleander/coordinate-swift
- Owner: oleander
- Created: 2018-09-28T06:41:49.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-23T20:15:27.000Z (over 5 years ago)
- Last Synced: 2024-11-20T20:12:05.657Z (2 months ago)
- Language: Swift
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Coordinate
[![Build Status](https://travis-ci.org/oleander/coordinate-swift.svg?branch=master)](https://travis-ci.org/oleander/coordinate-swift)
A Swift library for handling coordinates.
## Example
``` swift
let origin = Coordinate(
long: 100.561371,
lat: 13.822495
)let target = Coordinate(
long: 100.613660,
lat: 13.749423
)origin.distance(to: target) // 10.0km
```## Install
``` swift
// swift-tools-version: 4.2
import PackageDescriptionlet package = Package(
name: "YOUR_PROJECT_NAME",
dependencies: [
.package(
url: "https://github.com/oleander/coordinate-swift.git", .branch("master")
)
]
)
```