Class Mathematics

java.lang.Object
top.girlkisser.lazuli.api.mathematics.Mathematics

public final class Mathematics extends Object
Provides a handful of helpers for math related things.
  • Method Details

    • pointWithinRectangle

      public static boolean pointWithinRectangle(int pointX, int pointY, int rectX, int rectY, int rectWidth, int rectHeight)
      Checks if the provided point is within the rectangle.
      Parameters:
      pointX - The point's X coordinate.
      pointY - The point's Y coordinate.
      rectX - The rect's X coordinate.
      rectY - The rect's Y coordinate.
      rectWidth - The rect's width.
      rectHeight - The rect's height.
      Returns:
      Whether the rect contains the point.
    • getDirectionNormals

      public static net.minecraft.world.phys.Vec3 getDirectionNormals(net.minecraft.core.Direction direction)
      Get the direction normals for the given direction.
      Parameters:
      direction - The direction.
      Returns:
      The normals.