We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f907fea commit ce72ad3Copy full SHA for ce72ad3
src/electronics/coulombs_law.rs
@@ -50,12 +50,11 @@ pub fn coulombs_law(
50
"charge2: {}",
51
calculate_charge(charge1, force, distance)
52
));
53
- } else {
54
- return Ok(format!(
55
- "distance: {}",
56
- calculate_distance(charge_product, force)
57
- ));
58
}
+ Ok(format!(
+ "distance: {}",
+ calculate_distance(charge_product, force)
+ ))
59
60
fn calculate_distance(charge_product: f64, force: f64) -> f64 {
61
(COULOMBS_CONSTANT * charge_product / force.abs()).sqrt()
0 commit comments