ocaml-programming

Simple OCaml programs
git clone git://git.laack.co/ocaml-programming.git
Log | Files | Refs | README

atan2.ml (162B)


      1 let angle_between x_1 x_2 y_1 y_2 = 
      2     atan2 ((x_1 *. y_2) -. (y_1 *. x_2)) ((x_1 *. x_2) +. (y_1 *. y_2))
      3 
      4 
      5 let () = print_float (angle_between 5. 10. 2. 1.)
      6