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