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

CLI: Add exceptions for theresholds and exceptional values #483

Open
keinsell opened this issue Jun 1, 2024 · 1 comment
Open

CLI: Add exceptions for theresholds and exceptional values #483

keinsell opened this issue Jun 1, 2024 · 1 comment

Comments

@keinsell
Copy link
Owner

keinsell commented Jun 1, 2024

Forgot to add them.

    for d in dosage {
        let minimum_mass_string = d.min.to_string() + " mg";
        let maximum_mass_string = d.max.to_string() + " mg";
 
 
        let min_mass = Mass::from_str(&minimum_mass_string).unwrap();
        let max_mass = Mass::from_str(&maximum_mass_string).unwrap();
 
        if ingestion_mass >= min_mass && ingestion_mass <= max_mass {
            closest_dosage = Some(d);
            break;
        }
    }
Copy link

linear bot commented Jun 1, 2024

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