Class RenderMath

java.lang.Object
com.jozufozu.flywheel.util.RenderMath

public class RenderMath extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static float
    angleLerp(double pct, double current, double target)
     
    static float
    deg(double angle)
     
    static float
    diffuseLight(float x, float y, float z, boolean shaded)
     
    static float
    diffuseLightNether(float x, float y, float z, boolean shaded)
     
    static float
    f(byte b)
    Convert a signed byte into a normalized float.
    static float
    getShortestAngleDiff(double current, double target)
     
    static boolean
    isPowerOf2(int n)
     
    static double
    length(double x, double y, double z)
     
    static double
    lengthSqr(double x, double y, double z)
     
    static byte
    nb(float f)
    Convert a signed, normalized floating point value into a normalized byte.
    static int
    nextPowerOf2(int a)
     
    static float
    rad(double angle)
     
    static float
    uf(byte b)
    Convert an unsigned byte into a normalized float.
    static byte
    unb(float f)
    Convert an unsigned, normalized float into an unsigned normalized byte.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)