diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-05 21:43:08 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-05 21:43:08 +0100 |
commit | 6ae97ecca8b4f38213f0f45aa6eaef944cd6b497 (patch) | |
tree | 4161c43168fa02f89f4fcf352142d4646d0e980a /path/point.ml | |
parent | a8f37f041dce3f16917b6659d3ca97492f178f4d (diff) |
Responsive sliders
Diffstat (limited to 'path/point.ml')
-rwxr-xr-x | path/point.ml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/path/point.ml b/path/point.ml index 031e1e0..046c2e7 100755 --- a/path/point.ml +++ b/path/point.ml @@ -25,9 +25,13 @@ let copy point p = let set_angle p angle = { p with angle = Gg.Float.rad_of_deg (180. -. angle) } +let get_angle { angle; _} = 180. -. (Gg.Float.deg_of_rad angle) + let set_width p size = { p with size } +let get_width { size; _} = size + let (+) p1 p2 = { p1 with p = Gg.V2.(+) p1.p p2 } |