Module SypherEngine

Class Mathf

java.lang.Object
dev.aurumbyte.sypherengine.math.Mathf

public class Mathf extends Object

The Math utility class for the engine

Since:
0.3.2
Author:
AurumByte
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static float
    denormalize(float min, float max, float normalized)
    The getting back of a number from a normalized one
    static float
    inverseLerp(float a, float b, float v)
    The inverse of the linear interpolation formula
    static float
    lerp(float a, float b, float f)
    The linear interpolation formula
    static float
    normalize(float min, float max, float num)
    The normalization of a number

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Mathf

      public Mathf()
  • Method Details

    • lerp

      public static float lerp(float a, float b, float f)

      The linear interpolation formula

    • inverseLerp

      public static float inverseLerp(float a, float b, float v)

      The inverse of the linear interpolation formula

    • normalize

      public static float normalize(float min, float max, float num)

      The normalization of a number

    • denormalize

      public static float denormalize(float min, float max, float normalized)

      The getting back of a number from a normalized one