X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaCore%2FUnitsOfMeasure.fs;h=637f49e0a63757333d30cf48e84f14fad4480c84;hp=0d84d1648441392af1fbea6e85b23033b7d7b20a;hb=23466ba92c5595f6c0b9f97c86a221a4e5ffebe9;hpb=cb90b01c85183b2c75ee6d22b378b3ca99df6bf3 diff --git a/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs b/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs index 0d84d16..637f49e 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 mmInchRatio = 25.4 let μmToInch(x: float<μm>) : float = x / μmInchRatio let inchToμm(x: float) : float<μm> = x * μmInchRatio +let mmToInch(x: float) : float = x / mmInchRatio +let inchTomm(x: float) : float = x * mmInchRatio +