My agentic slop goes here. Not intended for anyone else!
1(** Longitude module *)
2
3type t
4
5(** {2 Construction} *)
6
7val create : float -> t
8(** Normalizes to [-180, 180] *)
9
10val of_dms : degree:int -> minute:int -> second:float -> t
11
12val unsafe_create : float -> t
13
14(** {2 Accessors} *)
15
16val to_float : t -> float
17val degree : t -> int
18val minute : t -> int
19val second : t -> float
20val decimal_minute : t -> float
21val hemisphere : t -> [`E | `W]
22
23(** {2 Range operations} *)
24
25val normalize_180 : float -> float
26(** Normalize any value to [-180, 180] *)
27
28val normalize_360 : float -> float
29(** Normalize any value to [0, 360] *)
30
31val to_range_180 : t -> float
32val to_range_360 : t -> float
33
34(** {2 Operations} *)
35
36val add : t -> float -> t
37val sub : t -> float -> t
38val neg : t -> t
39val abs : t -> float
40
41(** {2 Comparison} *)
42
43val equal : t -> t -> bool
44val compare : t -> t -> int
45val ( = ) : t -> t -> bool
46val ( < ) : t -> t -> bool
47val ( > ) : t -> t -> bool
48val ( <= ) : t -> t -> bool
49val ( >= ) : t -> t -> bool
50
51(** {2 Formatting} *)
52
53val to_string : t -> string
54val format : ?precision:int -> t -> string
55val to_dms_string : t -> string
56(** Format as "DDD°MM'SS.S\"E" *)