Skip to content
/ resistor Public
generated from oovm/RustTemplate

Resistor Calculations and Resistor Network Calculations

License

Notifications You must be signed in to change notification settings

oovm/resistor

Repository files navigation

Resistor

resistor is a library for calculating the resistance of a resistor based on the color bands.

#[test]
fn test_red4() {
    let resistor = ResistorBuilder::FourBand {
        first: ResistorColor::Red,
        second: ResistorColor::Red,
        multiplier: ResistorColor::Red,
        tolerance: ResistorColor::Red,
    }
    .build()
    .unwrap();
    assert_eq!(resistor.resistance, 2200.0);
    assert_eq!(resistor.to_string(), "Resistor(2200Ω ± 2%)");
}

About

Resistor Calculations and Resistor Network Calculations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages