Class MathsHelper

java.lang.Object
com.petrolpark.util.MathsHelper

public class MathsHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.core.Vec3i
    add(net.minecraft.core.Vec3i vec1, net.minecraft.core.Vec3i vec2)
     
    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.
    static double
    azimuth(net.minecraft.world.phys.Vec3 vec)
     
    static net.minecraft.world.phys.AABB
    expandToInclude(net.minecraft.world.phys.AABB box, net.minecraft.core.BlockPos pos)
     
    static net.minecraft.world.phys.AABB
    expandToInclude(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 double
    inclination(net.minecraft.world.phys.Vec3 vec)
     
    static net.minecraft.world.phys.Vec3
    rotate(net.minecraft.world.phys.Vec3 vec, net.minecraft.world.phys.Vec3 rotationAxis, double angle)
     
    static double
    volume(net.minecraft.world.phys.AABB box)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 which vec1 was rotated to get vec2
    • 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 rotate
      rotationAxis - The vector about which to rotate the first vector
      angle - 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)