2022-04-12 13:46:37 +02:00
|
|
|
(* BSD-2-Clause License *)
|
|
|
|
|
|
2022-04-07 14:45:11 +02:00
|
|
|
type t
|
|
|
|
|
|
2022-05-19 22:42:28 +02:00
|
|
|
(** [create lat lng] is an object representing a geographical point with the
|
|
|
|
|
given latitude and longitude *)
|
2022-04-07 14:45:11 +02:00
|
|
|
val create : float -> float -> t
|
|
|
|
|
|
2022-05-19 22:42:28 +02:00
|
|
|
(** [lat o] is the latitude of [o] *)
|
2022-04-07 14:45:11 +02:00
|
|
|
val lat : t -> float
|
|
|
|
|
|
2022-05-19 22:42:28 +02:00
|
|
|
(** [lng o] is the longitude of [o] *)
|
2022-04-07 14:45:11 +02:00
|
|
|
val lng : t -> float
|
|
|
|
|
|
2022-05-19 22:42:28 +02:00
|
|
|
(** [equals a b] is true iff [a] and [b] is at the same position (within a small
|
|
|
|
|
margin of error) *)
|
2022-04-07 14:45:11 +02:00
|
|
|
val equals : t -> t -> bool
|
|
|
|
|
|
2022-05-19 22:42:28 +02:00
|
|
|
(** [of_jv jv] is [jv] as a [Latlng.t] *)
|
2022-04-09 22:21:22 +02:00
|
|
|
val of_jv : Jv.t -> t
|
2022-04-07 14:45:11 +02:00
|
|
|
|
2022-05-19 22:42:28 +02:00
|
|
|
(** [to_jv o] is [o] as a {!Jv.t} *)
|
2022-04-09 22:21:22 +02:00
|
|
|
val to_jv : t -> Jv.t
|