projects
/
master-thesis.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add an ellipse benchmark + unit test (WIP)
[master-thesis.git]
/
Parasitemia
/
ParasitemiaCore
/
Ellipse.fs
diff --git
a/Parasitemia/ParasitemiaCore/Ellipse.fs
b/Parasitemia/ParasitemiaCore/Ellipse.fs
index
65264ad
..
5a7df2b
100644
(file)
--- 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'))
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
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