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

Add Thomson #34

Open
spease opened this issue Feb 1, 2018 · 1 comment
Open

Add Thomson #34

spease opened this issue Feb 1, 2018 · 1 comment

Comments

@spease
Copy link

spease commented Feb 1, 2018

Would be nice to have Thomson and Dalton available as derived units. The definition can be found on this page:
https://en.wikipedia.org/wiki/Thomson_(unit)

Barring that, it'd be helpful if a guide existed on how to derive units yourself.

@paholg
Copy link
Owner

paholg commented Jun 25, 2018

Sorry, I guess I never noticed this issue. If you're still interested in adding derived units, you can add them to the derived! call in the appropriate unit system in src/build.

For example, you can see the Newton defined here:

N: Newton = Kilogram * Meter / Second2, Force;

The format is CONSTANT_NAME: TypeName = *EXPRESSION*, Dimension;

The trailing , Dimension part is optional, but if included, should be a trait located in this file: https://github.com/paholg/dimensioned/blob/3ef45da755694ed56ed6e7d6c3114f19fd1f29d0/src/dimensions.rs

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

No branches or pull requests

2 participants