ocaml-programming

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

commit 53b0113ccfd5c500c6bd79df2f6ecd6aa209383f
parent a9b840aa5eda5390b9d78d6a641b589efd478175
Author: Andrew Laack <andrew@laack.co>
Date:   Wed,  2 Sep 2026 15:51:32 -0500

Other work

Diffstat:
Aotr/atan2.ml | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/otr/atan2.ml b/otr/atan2.ml @@ -0,0 +1,6 @@ +let angle_between x_1 x_2 y_1 y_2 = + atan2 ((x_1 *. y_2) -. (y_1 *. x_2)) ((x_1 *. x_2) +. (y_1 *. y_2)) + + +let () = print_float (angle_between 5. 10. 2. 1.) +