Sergi0Martin / MeasurementsTool

Easy to use measurement units conversion library for C#

Home Page:https://sergi0martin.github.io/MeasurementsTool/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MeasurementsTool πŸ“ πŸ“

codecov Production Deploy Docs Deploy

MeasurementsTool are simple C# Enum types with cool extension methods for measurement conversions.

Features

Available conversion types:

  • Length:

    International System: KM, HM, DAM, M, DM, CM, MM

    Non International System: YD, FT, IN

  • Weight:

    International System: T, Q, KG, HG, DAG, G, DG, CG, MG, MCG

    Non International System: LongTon, ShortTon, LB, OZ

  • Capacity:

    International System: YL, ZL, EL, PL, TL, GL, ML, kL, hL, daL, L, dL, cL, mL, uL, nL, pL, fL, aL, zL, yL

  • Temperature:

    International System: Celsius, Fahrenheit, Kelvin

Usage

WeightUnitType.<fromWeightUnit>.ConvertTo(<desiredWeightUnit>, <weightValue>)
LengthUnitType.<fromLengthUnit>.ConvertTo(<desiredLengthUnit>, <lengthValue>)

:

WeightUnitType.KG.ConvertTo(WeightUnitType.G, 50.5);
LengthUnitType.KM.ConvertTo(LengthUnitType.M, 50.5);

Github NuGet

About

Easy to use measurement units conversion library for C#

https://sergi0martin.github.io/MeasurementsTool/

License:GNU General Public License v3.0


Languages

Language:C# 100.0%