projects
/
master-thesis.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a DPI calculator to help to find the correct image resolution.
[master-thesis.git]
/
Parasitemia
/
ParasitemiaCore
/
UnitsOfMeasure.fs
diff --git
a/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs
b/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs
index
36c9495
..
637f49e
100644
(file)
--- a/
Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs
+++ b/
Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs
@@
-1,12
+1,17
@@
module ParasitemiaCore.UnitsOfMeasure
[<Measure>] type px // Pixel.
module ParasitemiaCore.UnitsOfMeasure
[<Measure>] type px // Pixel.
+[<Measure>] type mm
[<Measure>] type μm
[<Measure>] type inch
[<Measure>] type ppi = px / inch // Pixel per inch.
let μmInchRatio = 25.4e3<μm/inch>
[<Measure>] type μm
[<Measure>] type inch
[<Measure>] type ppi = px / inch // Pixel per inch.
let μmInchRatio = 25.4e3<μm/inch>
+let mmInchRatio = 25.4<mm/inch>
let μmToInch(x: float<μm>) : float<inch> = x / μmInchRatio
let inchToμm(x: float<inch>) : float<μm> = x * μmInchRatio
let μmToInch(x: float<μm>) : float<inch> = x / μmInchRatio
let inchToμm(x: float<inch>) : float<μm> = x * μmInchRatio
+let mmToInch(x: float<mm>) : float<inch> = x / mmInchRatio
+let inchTomm(x: float<inch>) : float<mm> = x * mmInchRatio
+