Skip to content

Commit eb2b060

Browse files
authored
Put # in comments
1 parent 7d77c88 commit eb2b060

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

physics/relativistic_velocity_summation.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
"""
2-
The relativistic velocity summation formula calculates the combined velocity v2
3-
of an object moving at speed v1 relative to a frame that is itself moving at velocity v
4-
relative to an observer. I take the last one to be strictly lower than the speed of
5-
light.
6-
The formula is v2 = (v1 + v)/(1 + v1 * v / c**2)
7-
v1 - speed of the object relative to a moving frame
8-
v - speed of the moving frame
9-
c - speed of light in the vacuum
10-
v2 - speed of the object relative to an observer
11-
"""
1+
# The relativistic velocity summation formula calculates the combined velocity v2
2+
# of an object moving at speed v1 relative to a frame that is itself moving at velocity v
3+
# relative to an observer. I take the last one to be strictly lower than the speed of
4+
# light.
5+
# The formula is v2 = (v1 + v)/(1 + v1 * v / c**2)
6+
# v1 - speed of the object relative to a moving frame
7+
# v - speed of the moving frame
8+
# c - speed of light in the vacuum
9+
# v2 - speed of the object relative to an observer
1210

1311
c = 299792458
1412

15-
1613
def relativistic_velocity_summation(
1714
object_velocity: float, frame_velocity: float
1815
) -> float:

0 commit comments

Comments
 (0)