Class Mathf

java.lang.Object
net.pl3x.map.core.util.Mathf

public class Mathf extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static long
    asLong(long x, long z)
     
    static long
    asLong(@NotNull Point pos)
     
    static double
    clamp(double min, double max, double value)
     
    static float
    clamp(float min, float max, float value)
     
    static int
    clamp(int min, int max, int value)
     
    static int
    distanceSquared(int x1, int z1, int x2, int z2)
     
    static float
    inverseLerp(float a, float b, float t)
     
    static float
    lerp(float a, float b, float t)
     
    static int
    longToX(long pos)
     
    static int
    longToZ(long pos)
     
    static int
    pow2(int value)
     
    static int
    square(int n)
     

    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 t)
    • inverseLerp

      public static float inverseLerp(float a, float b, float t)
    • clamp

      public static double clamp(double min, double max, double value)
    • clamp

      public static float clamp(float min, float max, float value)
    • clamp

      public static int clamp(int min, int max, int value)
    • distanceSquared

      public static int distanceSquared(int x1, int z1, int x2, int z2)
    • square

      public static int square(int n)
    • pow2

      public static int pow2(int value)
    • asLong

      public static long asLong(@NotNull @NotNull Point pos)
    • asLong

      public static long asLong(long x, long z)
    • longToX

      public static int longToX(long pos)
    • longToZ

      public static int longToZ(long pos)