Skip to main content

electric_potential

Function electric_potential 

Source
pub fn electric_potential(charge: f64, distance: f64) -> PhysicsResult<f64>
Expand description

Electric potential due to a point charge.

V = kₑ·q/r

§Arguments

  • charge – charge in C
  • distance – distance from the charge in m (must be > 0)

§Errors

Returns PhysicsError::InvalidParameter if distance is not positive.