diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-09 11:35:02 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-09 11:35:02 +0100 |
commit | c734c1b30fd1c58a0d42020859be31d89b92bcd0 (patch) | |
tree | c5a8e7e04347122f759d651f63e042b73e4b9f5b /shapes/tools/utils.mli | |
parent | 32618a5ce8e2b306af102e4c16711b090c36b840 (diff) |
Moved tools library inside the shapes one
Diffstat (limited to 'shapes/tools/utils.mli')
-rwxr-xr-x | shapes/tools/utils.mli | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/shapes/tools/utils.mli b/shapes/tools/utils.mli new file mode 100755 index 0000000..4e12906 --- /dev/null +++ b/shapes/tools/utils.mli @@ -0,0 +1,21 @@ +(** Return a normalize angle *) +val norm_angle + : Gg.v2 -> float + +(** return the interesction for two segments *) +val intersection + : (Gg.v2 * Gg.v2) -> (Gg.v2 * Gg.v2) -> Gg.v2 option + +(** Return the center of the cercle for three points + None if the point cannot be evaluated +*) +val center + : Gg.v2 -> Gg.v2 -> Gg.v2 -> Gg.v2 option + +(** Rotate the vector by the given angle *) +val rotate + : Gg.v2 -> float -> Gg.v2 + +(** Test equality between two points *) +val equal_point + : float -> Gg.v2 -> Gg.v2 -> bool |