Package com.petrolpark.util
Class MathsHelper
java.lang.Object
com.petrolpark.util.MathsHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.core.Vec3iadd(net.minecraft.core.Vec3i vec1, net.minecraft.core.Vec3i vec2) static doubleangleBetween(net.minecraft.world.phys.Vec3 vec1, net.minecraft.world.phys.Vec3 vec2, net.minecraft.world.phys.Vec3 plane) The directional angle in degrees between two vectors, between 0 and 360.static doubleazimuth(net.minecraft.world.phys.Vec3 vec) static net.minecraft.world.phys.AABBexpandToInclude(net.minecraft.world.phys.AABB box, net.minecraft.core.BlockPos pos) static net.minecraft.world.phys.AABBexpandToInclude(net.minecraft.world.phys.AABB box, net.minecraft.world.phys.Vec3 point) static Comparator<net.minecraft.world.phys.Vec3>getClosest(net.minecraft.world.phys.Vec3 targetVector) static doubleinclination(net.minecraft.world.phys.Vec3 vec) static net.minecraft.world.phys.Vec3rotate(net.minecraft.world.phys.Vec3 vec, net.minecraft.world.phys.Vec3 rotationAxis, double angle) static doublevolume(net.minecraft.world.phys.AABB box)
-
Constructor Details
-
MathsHelper
public MathsHelper()
-
-
Method Details
-
angleBetween
public static double angleBetween(net.minecraft.world.phys.Vec3 vec1, net.minecraft.world.phys.Vec3 vec2, net.minecraft.world.phys.Vec3 plane) The directional angle in degrees between two vectors, between 0 and 360.- Parameters:
vec1-vec2-plane- The approximate vector around whichvec1was rotated to getvec2
-
rotate
public static net.minecraft.world.phys.Vec3 rotate(net.minecraft.world.phys.Vec3 vec, net.minecraft.world.phys.Vec3 rotationAxis, double angle) - Parameters:
vec- The vector to rotaterotationAxis- The vector about which to rotate the first vectorangle- The angle in degrees through which to rotate the first vector around the second
-
add
public static net.minecraft.core.Vec3i add(net.minecraft.core.Vec3i vec1, net.minecraft.core.Vec3i vec2) -
getClosest
public static Comparator<net.minecraft.world.phys.Vec3> getClosest(net.minecraft.world.phys.Vec3 targetVector) -
azimuth
public static double azimuth(net.minecraft.world.phys.Vec3 vec) -
inclination
public static double inclination(net.minecraft.world.phys.Vec3 vec) -
expandToInclude
public static net.minecraft.world.phys.AABB expandToInclude(net.minecraft.world.phys.AABB box, net.minecraft.world.phys.Vec3 point) -
expandToInclude
public static net.minecraft.world.phys.AABB expandToInclude(net.minecraft.world.phys.AABB box, net.minecraft.core.BlockPos pos) -
volume
public static double volume(net.minecraft.world.phys.AABB box)
-