diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-03 05:42:35 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-03 20:19:14 +0100 |
commit | a8f37f041dce3f16917b6659d3ca97492f178f4d (patch) | |
tree | 35223969024c9ebaed7309b5a6299f8de5f18d1f /path/point.ml | |
parent | 20addbe8fd0ac4c79c8a69a4f888ec320a9ca4c3 (diff) |
Communication with webworker
Diffstat (limited to 'path/point.ml')
-rwxr-xr-x | path/point.ml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/path/point.ml b/path/point.ml index 06eb635..031e1e0 100755 --- a/path/point.ml +++ b/path/point.ml @@ -2,18 +2,21 @@ type t = { p: Gg.v2 ; size : float ; angle: float + ; stamp : float } let empty = { p = Gg.V2.of_tuple (0., 0.) ; size = 0. ; angle = 0. + ; stamp = 0. } -let create ~angle ~width ~x ~y = +let create ~angle ~width ~stamp ~x ~y = { p = Gg.V2.v x y ; size = width ; angle = Gg.Float.rad_of_deg (180. -. angle ) + ; stamp } let copy point p = @@ -30,6 +33,8 @@ let (+) p1 p2 = let get_coord { p; _ } = p +let get_stamp { stamp; _} = stamp + let get_coord' : t -> Gg.v2 = fun t -> |