X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=Parasitemia%2FParasitemiaCore%2FUnitsOfMeasure.fs;h=8202b8e28da7ed81e3ae6dc429dab74ef933dd60;hb=b87b35b922551f122228df1fd9c530bbb807935a;hp=81ce51f28901c1283f56f76c1d7008e2e8d0e78d;hpb=4bfa3cbdc6145e6944f02e24829ab2ef3a851ac1;p=master-thesis.git diff --git a/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs b/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs index 81ce51f..8202b8e 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 - -let μmInchRatio = 25.4e3<μm/inch> - -let μmToInch(x: float<μm>) : float = x / μmInchRatio -let inchToμm(x: float) : float<μm> = x * μmInchRatio - +[] type ppi = px / inch // Pixel per inch. +let μmPerInch = 25.4e3<μm/inch> +let mmPerInch = 25.4 +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