Package dev.kosmx.playerAnim.core.util
Class MathHelper
java.lang.Object
dev.kosmx.playerAnim.core.util.MathHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic floatclampToRadian(float f) Clamp f to -Pi until Pi rangestatic intcolorHelper(int r, int g, int b, int a) static doublelerp(double delta, double start, double end) static floatlerp(float delta, float start, float end) static ByteBufferreadFromIStream(InputStream stream) similar? to Java 9+InputStream.readAllBytes()because of compatibility, I can not use that
-
Constructor Details
-
MathHelper
public MathHelper()
-
-
Method Details
-
lerp
public static float lerp(float delta, float start, float end) -
lerp
public static double lerp(double delta, double start, double end) -
colorHelper
public static int colorHelper(int r, int g, int b, int a) -
clampToRadian
public static float clampToRadian(float f) Clamp f to -Pi until Pi range- Parameters:
f- radians- Returns:
- radians
-
readFromIStream
similar? to Java 9+InputStream.readAllBytes()because of compatibility, I can not use that- Parameters:
stream- read this stream- Returns:
- ByteBuffer from stream
- Throws:
IOException- ...
-