X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaCore%2FUnitsOfMeasure.fs;h=637f49e0a63757333d30cf48e84f14fad4480c84;hp=81ce51f28901c1283f56f76c1d7008e2e8d0e78d;hb=23466ba92c5595f6c0b9f97c86a221a4e5ffebe9;hpb=4bfa3cbdc6145e6944f02e24829ab2ef3a851ac1 diff --git a/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs b/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs index 81ce51f..637f49e 100644 --- a/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs +++ b/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs @@ -1,16 +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