Skip to content

Commit

Permalink
javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ghzdude committed Mar 27, 2024
1 parent 2e38708 commit d336641
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,15 @@ public static void renderTankFluid(CCRenderState renderState, Matrix4 translatio
renderState.reset();
}

/**
* Takes in the difference in x, y, and z from the camera to the rendering TE and
* calculates the squared distance and checks if it's within the range squared
* @param x the difference in x from entity to this rendering TE
* @param y the difference in y from entity to this rendering TE
* @param z the difference in z from entity to this rendering TE
* @param range distance needed to be rendered
* @return true if the camera is within the given range, otherwise false
*/
public static boolean canRender(double x, double y, double z, double range) {
double distance = (x * x) + (y * y) + (z * z);
return distance < range * range;
Expand Down

0 comments on commit d336641

Please sign in to comment.