X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaCore%2FUnitsOfMeasure.fs;h=ec343eaaf83df55272bb16ff9ae4ae1d24b2f474;hp=81ce51f28901c1283f56f76c1d7008e2e8d0e78d;hb=bb642da712542095d8c5ead2d0d036470eb040b9;hpb=4bfa3cbdc6145e6944f02e24829ab2ef3a851ac1 diff --git a/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs b/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs index 81ce51f..ec343ea 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