Skip to content

Commit 7fa920a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e4e9358 commit 7fa920a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

physics/de_broglie

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ def de_broglie_wavelength(momentum: float, in_ev: bool = False) -> str:
77

88
Parameters:
99
momentum (float): Momentum of the particle.
10-
in_ev (bool, optional): True if momentum is in eV·s.
10+
in_ev (bool, optional): True if momentum is in eV·s.
1111
If False, momentum is in kg·m/s.
1212

1313
Returns:
14-
str: The calculated de Broglie wavelength of the particle in meters,
14+
str: The calculated de Broglie wavelength of the particle in meters,
1515
formatted in scientific notation.
1616

1717
Raises:
@@ -37,7 +37,7 @@ def de_broglie_wavelength(momentum: float, in_ev: bool = False) -> str:
3737
if momentum <= 0:
3838
raise ValueError("Momentum can't be zero or negative.")
3939

40-
40+
4141
wavelength = PLANCK_CONSTANT_EVS / momentum if in_ev else PLANCK_CONSTANT_JS / momentum
4242
return f"{wavelength:.8e}"
4343

0 commit comments

Comments
 (0)