Skip to content

Commit bca3d89

Browse files
authored
Update lib.rs
1 parent 6e8c7f1 commit bca3d89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ pub extern "C" fn reflect_single_ion_c(num_species_target: &mut c_int, ux: &mut
416416
pos_origin: Vector::new(x, y, z),
417417
pos_old: Vector::new(x, y, z),
418418
dir_old: Vector::new(*ux, *uy, *uz),
419-
energy_origin: *E1,
419+
energy_origin: *E1*EV,
420420
asymptotic_deflection: 0.0,
421421
stopped: false,
422422
left: false,
@@ -441,7 +441,7 @@ pub extern "C" fn reflect_single_ion_c(num_species_target: &mut c_int, ux: &mut
441441
if output[0].pos.x >= 0.0 {
442442
*E1 = 0.0
443443
} else {
444-
*E1 = output[0].E;
444+
*E1 = output[0].E/EV;
445445
}
446446
}
447447

0 commit comments

Comments
 (0)