pub fn coulomb_force(charge_a: f64, charge_b: f64, distance: f64) -> Option<f64>Expand description
Computes electrostatic force using Coulomb’s law.
The sign is preserved so callers can distinguish attractive and repulsive direction conventions.
§Examples
use use_electricity::{COULOMB_CONSTANT, coulomb_force};
assert_eq!(coulomb_force(1.0, 1.0, 1.0), Some(COULOMB_CONSTANT));
assert_eq!(coulomb_force(1.0, -1.0, 1.0), Some(-COULOMB_CONSTANT));