637f49e0a63757333d30cf48e84f14fad4480c84
1
module ParasitemiaCore.UnitsOfMeasure
3 [<Measure>] type px // Pixel.
7 [<Measure>] type ppi = px / inch // Pixel per inch.
9 let μmInchRatio
= 25.4e3<μm
/inch>
10 let mmInchRatio = 25.4<mm/inch>
12 let μmToInch
(x
: float<μm
>) : float<inch> = x
/ μmInchRatio
13 let inchToμm
(x
: float<inch>) : float<μm
> = x
* μmInchRatio
15 let mmToInch(x
: float<mm>) : float<inch> = x
/ mmInchRatio
16 let inchTomm(x
: float<inch>) : float<mm> = x
* mmInchRatio