X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaCore%2FUnitsOfMeasure.fs;h=ec343eaaf83df55272bb16ff9ae4ae1d24b2f474;hp=0d84d1648441392af1fbea6e85b23033b7d7b20a;hb=bb642da712542095d8c5ead2d0d036470eb040b9;hpb=cb90b01c85183b2c75ee6d22b378b3ca99df6bf3 diff --git a/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs b/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs index 0d84d16..ec343ea 100644 --- a/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs +++ b/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs @@ -1,12 +1,17 @@ module ParasitemiaCore.UnitsOfMeasure -[] type px +[] type px // Pixel. +[] type mm [] type μm [] type inch -[] type ppi = px / inch +[] type ppi = px / inch // Pixel per inch. -let μmInchRatio = 25.4e3<μm/inch> +let μmPerInch = 25.4e3<μm/inch> +let mmPerInch = 25.4 -let μmToInch(x: float<μm>) : float = x / μmInchRatio -let inchToμm(x: float) : float<μm> = x * μmInchRatio +let μmToInch(x: float<μm>) : float = x / μmPerInch +let inchToμm(x: float) : float<μm> = x * μmPerInch + +let mmToInch(x: float) : float = x / mmPerInch +let inchTomm(x: float) : float = x * mmPerInch