Package com.jozufozu.flywheel.util
Class RenderMath
java.lang.Object
com.jozufozu.flywheel.util.RenderMath
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic floatangleLerp(double pct, double current, double target) static floatdeg(double angle) static floatdiffuseLight(float x, float y, float z, boolean shaded) static floatdiffuseLightNether(float x, float y, float z, boolean shaded) static floatf(byte b) Convert a signed byte into a normalized float.static floatgetShortestAngleDiff(double current, double target) static booleanisPowerOf2(int n) static doublelength(double x, double y, double z) static doublelengthSqr(double x, double y, double z) static bytenb(float f) Convert a signed, normalized floating point value into a normalized byte.static intnextPowerOf2(int a) static floatrad(double angle) static floatuf(byte b) Convert an unsigned byte into a normalized float.static byteunb(float f) Convert an unsigned, normalized float into an unsigned normalized byte.
-
Constructor Details
-
RenderMath
public RenderMath()
-
-
Method Details
-
nb
public static byte nb(float f) Convert a signed, normalized floating point value into a normalized byte. -
f
public static float f(byte b) Convert a signed byte into a normalized float. -
uf
public static float uf(byte b) Convert an unsigned byte into a normalized float. -
unb
public static byte unb(float f) Convert an unsigned, normalized float into an unsigned normalized byte. -
nextPowerOf2
public static int nextPowerOf2(int a) -
isPowerOf2
public static boolean isPowerOf2(int n) -
lengthSqr
public static double lengthSqr(double x, double y, double z) -
length
public static double length(double x, double y, double z) -
rad
public static float rad(double angle) -
deg
public static float deg(double angle) -
angleLerp
public static float angleLerp(double pct, double current, double target) -
getShortestAngleDiff
public static float getShortestAngleDiff(double current, double target) -
diffuseLight
public static float diffuseLight(float x, float y, float z, boolean shaded) -
diffuseLightNether
public static float diffuseLightNether(float x, float y, float z, boolean shaded)
-