* Add an exact method to compute an ellipse from three points and two tangents.
[master-thesis.git] / Parasitemia / Parasitemia / Utils.fs
index b30e9ac..638f9f5 100644 (file)
@@ -17,7 +17,7 @@ let logTime (m: string) (f: unit -> 'a) : 'a =
     sw.Start()
     let res = f ()
     sw.Stop()
-    log <| sprintf "%A (time: %A ms)" m sw.ElapsedMilliseconds
+    log <| sprintf "%s (time: %d ms)" m sw.ElapsedMilliseconds
     res
 
 let inline lineFromTwoPoints (p1: PointD) (p2: PointD) : Line =
@@ -37,7 +37,7 @@ let inline linePassThroughSegment (l: Line) (p1: PointD) (p2: PointD) : bool =
 let inline squaredDistanceTwoPoints (p1: PointD) (p2: PointD) =
     (p1.X - p2.X) ** 2.f + (p1.Y - p2.Y) ** 2.f
 
-let distanceTwoPoints (p1: PointD) (p2: PointD) =
+let inline distanceTwoPoints (p1: PointD) (p2: PointD) =
     squaredDistanceTwoPoints p1 p2 |> sqrt
 
 let countCells (cells: Cell list) : int * int =