cc.funkemunky.api.utils

## Class MathUtils

- java.lang.Object
- - cc.funkemunky.api.utils.MathUtils

    public class MathUtils
    extends java.lang.Object

### Constructor Summary

Constructors
Constructor and Description
`MathUtils()`

### Method Summary

All Methods Static Methods Concrete Methods
`static boolean` `approxEquals(double accuracy, double equalTo, double... equals)`
`static boolean` `approxEquals(double accuracy, int equalTo, int... equals)`
`static boolean` `approxEquals(double accuracy, long equalTo, long... equals)`
`static long` `elapsed(long time)`
`static boolean` `elapsed(long time, long needed)`
`static int` `floor(double var0)`
`static long` `gcd(long... input)`
`static long` `gcd(long a, long b)`
`static float` `getAngleDelta(float one, float two)`
`static org.bukkit.util.Vector` `getCenterOfBox(BoundingBox box)`
`static double` `getDelta(double one, double two)`
`static float` `getDelta(float one, float two)`
`static long` `getDelta(int one, int two)`
`static long` `getDelta(long one, long two)`
`static double` `getDirection(org.bukkit.Location from, org.bukkit.Location to)`
`static double` `getDistanceToBox(org.bukkit.util.Vector vec, BoundingBox box)`
`static int` `getDistanceToGround(org.bukkit.entity.Player p)`
`static double` `getHorizontalDistance(org.bukkit.Location from, org.bukkit.Location to)`
`static double[]` `getOffsetFromEntity(org.bukkit.entity.Player player, org.bukkit.entity.LivingEntity entity)`
`static double[]` `getOffsetFromLocation(org.bukkit.Location one, org.bukkit.Location two)`
`static float[]` `getRotations(org.bukkit.entity.LivingEntity origin, org.bukkit.entity.LivingEntity point)`
`static float[]` `getRotations(org.bukkit.Location one, org.bukkit.Location two)`
`static double` `getVerticalDistance(org.bukkit.Location from, org.bukkit.Location to)`
`static double` `getYawDifference(org.bukkit.Location one, org.bukkit.Location two)`
`static double` `hypot(double... value)`
`static float` `hypot(float... value)`
`static boolean` `isLookingTowardsEntity(org.bukkit.Location from, org.bukkit.Location to, org.bukkit.entity.LivingEntity entity)`
`static long` `lcm(long... input)`
`static long` `lcm(long a, long b)`
`static int` `millisToTicks(long millis)`
`static double` `normalizeAngle(double yaw)`
`static float` `normalizeAngle(float yaw)`
`static double` `offset(org.bukkit.util.Vector from, org.bukkit.util.Vector to)`
`static boolean` `playerLooked(org.bukkit.Location from, org.bukkit.Location to)`
`static boolean` `playerMoved(org.bukkit.Location from, org.bukkit.Location to)`
`static boolean` `playerMoved(org.bukkit.util.Vector from, org.bukkit.util.Vector to)`
`static double` `round(double value)`
`static double` `round(double value, int places)`
`static double` `round(double value, int places, java.math.RoundingMode mode)`
`static float` `round(float value)`
`static float` `round(float value, int places)`
`static float` `round(float value, int places, java.math.RoundingMode mode)`
`static double` `trim(int degree, double d)`
`static float` `trimFloat(int degree, float d)`
`static int` `tryParse(java.lang.String string)`
`static double` `yawTo180D(double dub)`
`static float` `yawTo180F(float flub)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MathUtils

    public MathUtils()

### Method Detail

#### offset

    public static double offset(org.bukkit.util.Vector from,
                                org.bukkit.util.Vector to)

#### playerMoved

    public static boolean playerMoved(org.bukkit.Location from,
                                      org.bukkit.Location to)

#### approxEquals

    public static boolean approxEquals(double accuracy,
                                       double equalTo,
                                       double... equals)

#### approxEquals

    public static boolean approxEquals(double accuracy,
                                       int equalTo,
                                       int... equals)

#### approxEquals

    public static boolean approxEquals(double accuracy,
                                       long equalTo,
                                       long... equals)

#### getDistanceToBox

    public static double getDistanceToBox(org.bukkit.util.Vector vec,
                                          BoundingBox box)

#### getCenterOfBox

    public static org.bukkit.util.Vector getCenterOfBox(BoundingBox box)

#### tryParse

    public static int tryParse(java.lang.String string)

#### hypot

    public static double hypot(double... value)

#### hypot

    public static float hypot(float... value)

#### playerMoved

    public static boolean playerMoved(org.bukkit.util.Vector from,
                                      org.bukkit.util.Vector to)

#### playerLooked

    public static boolean playerLooked(org.bukkit.Location from,
                                       org.bukkit.Location to)

#### elapsed

    public static boolean elapsed(long time,
                                  long needed)

#### gcd

    public static long gcd(long a,
                           long b)

#### gcd

    public static long gcd(long... input)

#### normalizeAngle

    public static float normalizeAngle(float yaw)

#### normalizeAngle

    public static double normalizeAngle(double yaw)

#### getAngleDelta

    public static float getAngleDelta(float one,
                                      float two)

#### lcm

    public static long lcm(long a,
                           long b)

#### lcm

    public static long lcm(long... input)

#### getDelta

    public static float getDelta(float one,
                                 float two)

#### getDelta

    public static double getDelta(double one,
                                  double two)

#### getDelta

    public static long getDelta(long one,
                                long two)

#### getDelta

    public static long getDelta(int one,
                                int two)

#### elapsed

    public static long elapsed(long time)

#### getHorizontalDistance

    public static double getHorizontalDistance(org.bukkit.Location from,
                                               org.bukkit.Location to)

#### millisToTicks

    public static int millisToTicks(long millis)

#### getVerticalDistance

    public static double getVerticalDistance(org.bukkit.Location from,
                                             org.bukkit.Location to)

#### getDistanceToGround

    public static int getDistanceToGround(org.bukkit.entity.Player p)

#### trim

    public static double trim(int degree,
                              double d)

#### trimFloat

    public static float trimFloat(int degree,
                                  float d)

#### getYawDifference

    public static double getYawDifference(org.bukkit.Location one,
                                          org.bukkit.Location two)

#### round

    public static double round(double value,
                               int places)

#### round

    public static double round(double value,
                               int places,
                               java.math.RoundingMode mode)

#### round

    public static double round(double value)

#### round

    public static float round(float value,
                              int places)

#### round

    public static float round(float value,
                              int places,
                              java.math.RoundingMode mode)

#### round

    public static float round(float value)

#### floor

    public static int floor(double var0)

#### yawTo180F

    public static float yawTo180F(float flub)

#### yawTo180D

    public static double yawTo180D(double dub)

#### getDirection

    public static double getDirection(org.bukkit.Location from,
                                      org.bukkit.Location to)

#### getRotations

    public static float[] getRotations(org.bukkit.Location one,
                                       org.bukkit.Location two)

#### getRotations

    public static float[] getRotations(org.bukkit.entity.LivingEntity origin,
                                       org.bukkit.entity.LivingEntity point)

#### isLookingTowardsEntity

    public static boolean isLookingTowardsEntity(org.bukkit.Location from,
                                                 org.bukkit.Location to,
                                                 org.bukkit.entity.LivingEntity entity)

#### getOffsetFromEntity

    public static double[] getOffsetFromEntity(org.bukkit.entity.Player player,
                                               org.bukkit.entity.LivingEntity entity)

#### getOffsetFromLocation

    public static double[] getOffsetFromLocation(org.bukkit.Location one,
                                                 org.bukkit.Location two)