X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaCore%2FEllipse.fs;fp=Parasitemia%2FParasitemiaCore%2FEllipse.fs;h=5a7df2b3256581de2032cfeadf594c30a54c536f;hp=65264ad81abef16bfaba6e97157791e34f804582;hb=2e029053d283ce141ce9870336cb9574ea4a203a;hpb=8866c578f1210295bdcf04c8212eae81d52d630a diff --git a/Parasitemia/ParasitemiaCore/Ellipse.fs b/Parasitemia/ParasitemiaCore/Ellipse.fs index 65264ad..5a7df2b 100644 --- a/Parasitemia/ParasitemiaCore/Ellipse.fs +++ b/Parasitemia/ParasitemiaCore/Ellipse.fs @@ -78,6 +78,11 @@ let ellipse (p1x : float) (p1y : float) (m1 : float) (p2x : float) (p2y : float) Some (Types.Ellipse (float32 cx, float32 cy, float32 majorAxis, float32 minorAxis, float32 phi')) + +// Optimized version of 'ellipse': TODO +let ellipse' (p1x : float) (p1y : float) (m1 : float) (p2x : float) (p2y : float) (m2 : float) (p3x : float) (p3y : float) : Types.Ellipse option = + ellipse p1x p1y m1 p2x p2y m2 p3x p3y + let inline private vectorRotation (px : float32) (py : float32) (vx : float32) (vy : float32) (p0x : float32) (p0y : float32) : float32 = if py > p0y then if vx > 0.f then -1.f else 1.f