public class AngleHelper
extends java.lang.Object
| Constructor and Description |
|---|
AngleHelper() |
| Modifier and Type | Method and Description |
|---|---|
static float |
angleLerp(double pct,
double current,
double target) |
static float |
deg(double angle) |
static float |
getShortestAngleDiff(double current,
double target) |
static float |
horizontalAngle(net.minecraft.util.Direction facing)
Legacy method.
|
static float |
horizontalAngleNew(net.minecraft.util.Direction facing)
Same as
horizontalAngle(Direction), but returns 0 instead of -90 for vertical directions. |
static float |
rad(double angle) |
static float |
verticalAngle(net.minecraft.util.Direction facing) |
public static float horizontalAngle(net.minecraft.util.Direction facing)
horizontalAngleNew(Direction) for new method.public static float horizontalAngleNew(net.minecraft.util.Direction facing)
horizontalAngle(Direction), but returns 0 instead of -90 for vertical directions.public static float verticalAngle(net.minecraft.util.Direction facing)
public static float rad(double angle)
public static float deg(double angle)
public static float angleLerp(double pct,
double current,
double target)
public static float getShortestAngleDiff(double current,
double target)