-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
38 lines (33 loc) · 932 Bytes
/
types.ts
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
/** The world coordinate */
export interface Coordinate {
/** The latitude from 90 to -90, north to south. */
latitude: number
/** The longitude from 180 to -180, east to west. */
longitude: number
}
/** A cartesian point */
export interface Point {
/** The position on the horizontal axis. */
x: number
/** The position on the vertical axis. */
y: number
}
/** The bounds of the world coordinates. */
export interface CoordinateBounds {
/** The world coordinate at the most north west point. */
northWest: Coordinate
/** The world coordinate at the most south east point. */
southEast: Coordinate
}
/** The bounds of the cartesian coordinates */
export interface PointBounds {
/** The point at the top left. */
topLeft: Point
/** The point at the bottom right. */
bottomRight: Point
}
export interface Size {
width: number
height: number
}
export interface Rectangle extends Point, Size {}