Skip to content

Commit 5e2c426

Browse files
committed
Replaced stray powfs in lib.rs
1 parent bfe7734 commit 5e2c426

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/lib.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ pub fn reflect_single_ion_py(ion: &PyDict, target: &PyDict, vx: f64, vy: f64, vz
11521152

11531153
let options = Options::default_options(false);
11541154

1155-
let velocity2 = vx.powf(2.) + vy.powf(2.) + vz.powf(2.); //m/s
1155+
let velocity2 = vx*vx + vy*vy + vz*vz; //m^2/s^2
11561156
let energy_eV = 0.5*m1*AMU*velocity2/EV; //EV
11571157

11581158
let ux = vx/velocity2.sqrt();

‎src/material.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ impl <T: Geometry> Material<T> {
279279

280280
let S_high = bethe_bloch_stopping_power_cross_section(Za, *Zb, E, Ma);
281281

282-
// correction applied only to LS component
282+
// ck correction applied only to LS component
283283
1./(1./S_high + 1./(S_low*ck))
284284
},
285285
//Lindhard-Scharff, Oen-Robinson, Lindhard Equipartition
@@ -289,7 +289,7 @@ impl <T: Geometry> Material<T> {
289289
ElectronicStoppingMode::INTERPOLATEDPLUS{ci} => {
290290
let S_high = bethe_bloch_stopping_power_cross_section(Za, *Zb, E, Ma);
291291

292-
// correction applied only to LS component
292+
// ck correction applied only to LS component
293293
(S_high.powf(-ci) + (S_low*ck).powf(-ci)).powf(-1./ci)
294294
},
295295

0 commit comments

Comments
 (0)