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
@@ -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
+
+
+