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

Quantities with similar units #1

Open
nourani opened this issue Feb 18, 2014 · 3 comments
Open

Quantities with similar units #1

nourani opened this issue Feb 18, 2014 · 3 comments
Labels

Comments

@nourani
Copy link
Owner

nourani commented Feb 18, 2014

Some of the Derived units have either no Base units or have the same units. These include:

angle (radian) = m/m
solid angle (steradian) = m2/m2
Luminous Flux (lumen) = cd; same as Luminous
Radioactivity (becquerel) = s-1; same as Frequency

The way we currently implement the template class we cannot differentiate between m, m/m, m2/m2 etc

Don't know what is the best way to deal with this. Maybe we need to include another variable to be used to keep track of these. I was thinking of using a "string literal" but didn't figure out how to implement this.

@crayzeewulf
Copy link
Contributor

It might be worth learning from the way Boost.Units handles this.

@nourani
Copy link
Owner Author

nourani commented Nov 4, 2014

Hhhmm I don't know if expanding the set of base dimensions is the "correct" way of doing this, although it is a solution. Isn't there really a standard for this? Need to look into this again

@crayzeewulf
Copy link
Contributor

I agree that it does not seem like a very elegant solution but I have not come across any good way of doing this either (especially if we want to minimize the runtime overhead of using this class).

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

No branches or pull requests

2 participants