-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHaversine.h
40 lines (34 loc) · 821 Bytes
/
Haversine.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// Haversine.h
// ShortestPath
//
// Created by Yoo Rinjae on 12. 11. 8..
// Copyright (c) 2012년 DearMai. All rights reserved.
//
#import <Foundation/Foundation.h>
extern float const HAVERSINE_RADS_PER_DEGREE;
extern float const HAVERSINE_MI_RADIUS;
extern float const HAVERSINE_KM_RADIUS;
extern float const HAVERSINE_M_PER_KM;
extern float const HAVERSINE_F_PER_MI;
@interface Haversine : NSObject {
float lat1;
float lon1;
float lat2;
float lon2;
}
@property float lat1;
@property float lon1;
@property float lat2;
@property float lon2;
- (id)init;
- (id)initWithLat1:(float)newLat1
lon1:(float)newLon1
lat2:(float)newLat2
lon2:(float)newLon2;
- (float)distance;
- (float)toKilometers;
- (float)toMeters;
- (float)toMiles;
- (float)toFeet;
@end