keinsell / neuronek

🧬 Intelligent dosage tracker application with purpose to monitor supplements, nootropics and psychoactive substances along with their long-term influence on one's mind and body.
https://neuronek.up.railway.app/reference
Do What The F*ck You Want To Public License
14 stars 2 forks source link

CLI: Add exceptions for theresholds and exceptional values #483

Open keinsell opened 5 months ago

keinsell commented 5 months ago

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;
        }
    }
linear[bot] commented 5 months ago

NEU-37 CLI: Add exceptions for theresholds and exceptional values