Open UnixJunkie opened 1 year ago
let dist2 u v =
let dx = u.x -. v.x in
let dy = u.y -. v.y in
let dz = u.z -. v.z in
dx *. dx +. dy *. dy +. dz *. dz
[@@inline]
(* the one in library vector3 should be optimized *)
let dist u v =
sqrt (dist2 u v)
[@@inline]