Skip to content

Commit

Permalink
Remove dynamicfence; implement hashcode() function for offset hitboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
Axionize committed Sep 25, 2024
1 parent 7af6cfb commit 8a09be4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 57 deletions.

This file was deleted.

6 changes: 6 additions & 0 deletions src/main/java/ac/grim/grimac/utils/math/GrimMath.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,10 @@ public static boolean inRange(double value, double min, double max) {
public static boolean isNearlySame(double a, double b, double epoch) {
return Math.abs(a-b) < epoch;
}

public static long hashCode(double x, int y, double z) {
long l = (long)(x * 3129871) ^ (long)z * 116129781L ^ (long)y;
l = l * l * 42317861L + l * 11L;
return l >> 16;
}
}

0 comments on commit 8a09be4

Please sign in to comment.