X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaCore%2FUnitsOfMeasure.fs;h=ec343eaaf83df55272bb16ff9ae4ae1d24b2f474;hp=36c949542e8e909662d92032418f35420e19cff2;hb=bb642da712542095d8c5ead2d0d036470eb040b9;hpb=3f8b0d281b3058faf23dbd0363de440bd04c6574 diff --git a/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs b/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs index 36c9495..ec343ea 100644 --- a/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs +++ b/Parasitemia/ParasitemiaCore/UnitsOfMeasure.fs @@ -1,12 +1,17 @@ module ParasitemiaCore.UnitsOfMeasure [] type px // Pixel. +[] type mm [] type μm [] type 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