Skip to content

Commit 8ccac9a

Browse files
authored
Remove Math#sqrt from vertical velocity.
Taken from ElevatedDev#126 on Frequency.
1 parent dc0e4cb commit 8ccac9a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/main/java/xyz/elevated/frequency/data/impl/VelocityManager.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ public void addVelocityEntry(double x, double y, double z) {
2525
// Get the highest horizontal velocity
2626
public double getMaxHorizontal() {
2727
try {
28-
return Math.sqrt(
29-
velocities.stream().mapToDouble(VelocitySnapshot::getHorizontal).max().orElse(0.0));
28+
returnvelocities.stream().mapToDouble(VelocitySnapshot::getHorizontal).max().orElse(0.0);
3029
} catch (Exception e) {
3130
return 1.0;
3231
}

0 commit comments

Comments
 (0)