We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KleeSwept/src/main/java/com/github/kleesup/kleeswept/world/chunk/AbstractChunkCollisionWorld.java
Line 58 in 33a1f29
Doesn't take in a chunk that wasn't fully filled by the rectangle because the division does down-casting. Therefore, this would be the right approach:
//in Helper class public static int intDivCastUp(int a, float div){ float result = a / div; return result % 1 != 0 ? (int)(result+1) : (int)(result) } float inv = 1f / chunkSize; int chunksX = Helper.intDivCastUp(maxX, div); int chunksY = Helper.intDivCastUp(maxY, div);
The text was updated successfully, but these errors were encountered:
KleeSup
No branches or pull requests
KleeSwept/src/main/java/com/github/kleesup/kleeswept/world/chunk/AbstractChunkCollisionWorld.java
Line 58 in 33a1f29
Doesn't take in a chunk that wasn't fully filled by the rectangle because the division does down-casting.
Therefore, this would be the right approach:
The text was updated successfully, but these errors were encountered: