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

Question: Can this support decimals/fractions #2

Open
bristoljon opened this issue Dec 8, 2021 · 0 comments
Open

Question: Can this support decimals/fractions #2

bristoljon opened this issue Dec 8, 2021 · 0 comments

Comments

@bristoljon
Copy link

bristoljon commented Dec 8, 2021

Hi, stumbled upon this as just learning Rust and looking at options to provide more accurate conversions between base 12 and base 10 that I can achieve with Javascript.

I attempted to use this like:

let base12 = BaseCustom::<char>::new("0123456789ab".chars().collect());
println!("{}", base12.decimal("1.6"));

Expecting (/hoping) would get result of 1.5 but it panicked

Any chance this could be adapted to support fractions?

@bristoljon bristoljon changed the title Question: Can this support decima?ls/fractions Question: Can this support decimals/fractions Dec 8, 2021
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

1 participant