Class MathHelper

java.lang.Object
dev.kosmx.playerAnim.core.util.MathHelper

public class MathHelper extends Object
  • 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

      public static ByteBuffer readFromIStream(InputStream stream) throws IOException
      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 - ...