2014-10-26 17:29:11 +01:00
|
|
|
type t =
|
|
|
|
{ x : float;
|
|
|
|
y : float;
|
|
|
|
z : float;
|
2017-08-18 18:28:33 +02:00
|
|
|
} [@@deriving sexp]
|
2014-10-26 17:29:11 +01:00
|
|
|
|
2015-11-17 22:25:26 +01:00
|
|
|
(** Create from a tuple of floats *)
|
|
|
|
val of_tuple : units:Units.units -> float*float*float -> t
|
|
|
|
|
2014-10-26 17:29:11 +01:00
|
|
|
(** Create from an xyz string *)
|
2015-11-17 22:25:26 +01:00
|
|
|
val of_string : units:Units.units -> string -> t
|
2014-10-26 17:29:11 +01:00
|
|
|
|
|
|
|
(** Convert to a string for printing *)
|
2015-11-17 22:25:26 +01:00
|
|
|
val to_string : units:Units.units -> t -> string
|
2014-10-26 17:29:11 +01:00
|
|
|
|
|
|
|
(** Computes the squared distance between 2 points *)
|
|
|
|
val distance2 : t -> t -> Qptypes.Positive_float.t
|
|
|
|
|
|
|
|
(** Computes the distance between 2 points *)
|
|
|
|
val distance : t -> t -> float
|