projects
/
master-thesis.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The images to be analyzed can be selected.
[master-thesis.git]
/
Parasitemia
/
Parasitemia
/
UnitsOfMeasure.fs
diff --git
a/Parasitemia/Parasitemia/UnitsOfMeasure.fs
b/Parasitemia/Parasitemia/UnitsOfMeasure.fs
index
ff9ea67
..
6a3b745
100644
(file)
--- a/
Parasitemia/Parasitemia/UnitsOfMeasure.fs
+++ b/
Parasitemia/Parasitemia/UnitsOfMeasure.fs
@@
-1,18
+1,16
@@
module UnitsOfMeasure
module UnitsOfMeasure
-[<Measure>]
-type px
+[<Measure>] type px
+[<Measure>] type μm
+[<Measure>] type inch
+[<Measure>] type ppi = px / inch
-[<Measure>]
-type μm =
- static member ConvertToInch(x: float<μm>) : float<inch> =
- x * 1.<inch> / 25.4e3<μm>
+let μmInchRatio = 25.4e3<μm/inch>
-and [<Measure>] inch
+let μmToInch(x: float<μm>) : float<inch> = x / μmInchRatio
+let inchToμm(x: float<inch>) : float<μm> = x * μmInchRatio
-[<Measure>]
-type ppi = px / inch