Source

Triangulator / arithmetic.ml

Full commit
1
2
3
4
5
6
(* some inexact arithmetic *)
let abs (x: float) = if x > 0. then x else -.x;; 
let precision = 1.e-8;;
(* float equality *)
let (===) a b =
  if (abs (a-.b)) < precision then true else false;;