projects
/
master-thesis.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Use real unit (um and ppi) instead of pixel in the parameters.
[master-thesis.git]
/
Parasitemia
/
Parasitemia
/
UnitsOfMeasure.fs
diff --git a/Parasitemia/Parasitemia/UnitsOfMeasure.fs
b/Parasitemia/Parasitemia/UnitsOfMeasure.fs
new file mode 100644
(file)
index 0000000..
ff9ea67
--- /dev/null
+++ b/
Parasitemia/Parasitemia/UnitsOfMeasure.fs
@@ -0,0
+1,18
@@
+module UnitsOfMeasure
+
+[<Measure>]
+type px
+
+[<Measure>]
+type μm =
+ static member ConvertToInch(x: float<μm>) : float<inch> =
+ x * 1.<inch> / 25.4e3<μm>
+
+and [<Measure>] inch
+
+
+[<Measure>]
+type ppi = px / inch
+
+
+