Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can you lookup a unit given a string? #3

Closed
BrannonKing opened this issue Feb 20, 2014 · 1 comment
Closed

can you lookup a unit given a string? #3

BrannonKing opened this issue Feb 20, 2014 · 1 comment

Comments

@BrannonKing
Copy link

I have a need for a method that looks like this:

double Convert(double value, string currentUnits, string finalUnits);

For example, currentUnits might equal m/s and finalUnits might equal MPH. Is there some way to parse the unit strings with this framework?

@anders9ustafsson
Copy link
Contributor

As it is right now, I have not implemented string parsing, the main idea is to perform unit conversion using explicit generic types, such as Unit<Velocity>.

I realize that I have not included "MPH" as a velocity unit yet, but it should be a simple thing for you to add this unit to the class library.

I have not actively developing this library for a while, but I might deal with for example missing units and some other shortcomings in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants