Skip to content

Commit de8c051

Browse files
authored
Update Relativity.java
White spaces added and removed
1 parent f26c544 commit de8c051

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/com/thealgorithms/physics/Relativity.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static double lengthContraction(double length, double v) {
4646
if (length < 0) {
4747
throw new IllegalArgumentException("Length must be non-negative");
4848
}
49-
return length/gamma(v);
49+
return length / gamma(v);
5050
}
5151

5252
/**
@@ -60,9 +60,9 @@ public static double timeDilation(double time, double v) {
6060
if (time < 0) {
6161
throw new IllegalArgumentException("Time must be non-negative");
6262
}
63-
return time*gamma(v);
63+
return time * gamma(v);
6464
}
65-
65+
6666
/**
6767
* Calculates the velocity with respect to the moving frame.
6868
*
@@ -80,4 +80,3 @@ public static double velocityAddition(double v1, double v) {
8080
return (v1 - v) / (1 - v1 * v / (SPEED_OF_LIGHT * SPEED_OF_LIGHT));
8181
}
8282
}
83-

0 commit comments

Comments
 (0)