Class Mathematics
java.lang.Object
top.girlkisser.lazuli.api.mathematics.Mathematics
Provides a handful of helpers for math related things.
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.phys.Vec3getDirectionNormals(net.minecraft.core.Direction direction) Get the direction normals for the given direction.static booleanpointWithinRectangle(int pointX, int pointY, int rectX, int rectY, int rectWidth, int rectHeight) Checks if the provided point is within the rectangle.
-
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.
-