From 6354358caa1dfbf2fe1d481f6ac5fba3775938fc Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Tue, 22 Dec 2020 21:42:55 +0100 Subject: Blog integration --- path/builder.ml | 12 ++++-------- path/builder.mli | 4 +++- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'path') diff --git a/path/builder.ml b/path/builder.ml index b77c60a..3ccad9c 100755 --- a/path/builder.ml +++ b/path/builder.ml @@ -328,7 +328,6 @@ module Make(Point:P) = struct Repr.stop repr end - let box : bezier -> Gg.box2 = fun bezier -> @@ -338,7 +337,6 @@ module Make(Point:P) = struct |> (fun b -> Gg.Box2.add_pt b bezier.ctrl0) |> (fun b -> Gg.Box2.add_pt b bezier.ctrl1) - let distance : Gg.v2 -> fixedPath -> float option = fun point beziers -> @@ -353,6 +351,7 @@ module Make(Point:P) = struct begin match Gg.Box2.mem point box with | false -> res | true -> + (* TODO Evaluate the normal *) res end | Curve bezier -> @@ -373,12 +372,9 @@ module Make(Point:P) = struct | None -> Some distance | Some d -> if d < distance then res else (Some distance) end - - ) - - - - + let id + : fixedPath -> int + = fun {id; _} -> id end diff --git a/path/builder.mli b/path/builder.mli index 42f433e..557cdfa 100755 --- a/path/builder.mli +++ b/path/builder.mli @@ -32,7 +32,6 @@ end module Make(P:P) : sig - type bezier type t type fixedPath @@ -72,4 +71,7 @@ module Make(P:P) : sig (** Return the shortest distance between the mouse and a point *) val distance : Gg.v2 -> fixedPath -> float option + + val id + : fixedPath -> int end -- cgit v1.2.3