X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaCore%2FUnitsOfMeasure.fs;h=4af1e557e95aa789f59202aedbfd9e108a104dc8;hp=0d84d1648441392af1fbea6e85b23033b7d7b20a;hb=2d712781def419c9acc98368f7102b19b064f16d;hpb=cb90b01c85183b2c75ee6d22b378b3ca99df6bf3 diff --git a/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs b/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs index 0d84d16..4af1e55 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