Function resistance
pub fn resistance(voltage: f64, current: f64) -> Option<f64>Expand description
Computes resistance from voltage and current using Ohm’s law.
§Examples
use use_electricity::resistance;
assert_eq!(resistance(10.0, 2.0), Some(5.0));
assert_eq!(resistance(-10.0, 2.0), None);