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

best_prefix produces invalid results #170

Open
Jubke opened this issue Jul 27, 2018 · 1 comment · May be fixed by #347
Open

best_prefix produces invalid results #170

Jubke opened this issue Jul 27, 2018 · 1 comment · May be fixed by #347
Assignees
Labels

Comments

@Jubke
Copy link

Jubke commented Jul 27, 2018

I stumbled upon the 'best_prefix' method when I was looking for something along the lines of #4. Trying to use it, though, I noticed it doesn't work for mass units:

t = Unit.new("2000 kg").best_prefix
=> 2 kkg 

and

t = Unit.new("23000 mg").best_prefix
=> 23000 mg

I'm guessing has something to do with kg being SI base unit instead of g?!

@olbrich olbrich self-assigned this Jul 27, 2018
@olbrich olbrich added the bug label Jul 27, 2018
@olbrich
Copy link
Owner

olbrich commented Jul 27, 2018

Thanks, I'll look into it.

olbrich added a commit that referenced this issue Mar 16, 2024
@olbrich olbrich linked a pull request Mar 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants