10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-28 15:16:01 +01:00
quantum_package/ocaml/test_point3d.ml

20 lines
674 B
OCaml
Raw Normal View History

2014-08-23 17:07:47 +02:00
let test_point3d_1 () =
let input = "7.4950000 -0.1499810 0.5085570" in
2014-10-07 19:33:11 +02:00
let p3d = Point3d.of_string Units.Angstrom input in
print_endline(Point3d.to_string Units.Angstrom p3d);
let p3d = Point3d.of_string Units.Bohr input in
print_endline (Point3d.to_string Units.Bohr p3d)
2014-08-23 17:07:47 +02:00
;;
let test_point3d () =
2014-10-07 19:33:11 +02:00
let p1 = Point3d.of_string Units.Bohr "1. 2. 3."
and p2 = Point3d.of_string Units.Bohr "-2. 1. 1.5" in
Printf.printf "%f\n" (Point3d.distance p1 p2);
let p1 = Point3d.of_string Units.Angstrom "1. 2. 3."
and p2 = Point3d.of_string Units.Angstrom "-2. 1. 1.5" in
2014-08-23 17:07:47 +02:00
Printf.printf "%f\n" (Point3d.distance p1 p2)
;;
2014-09-18 17:01:43 +02:00
test_point3d_1 ();
2014-10-07 19:33:11 +02:00
test_point3d ();