java.lang.Object
dev.secondsun.util.Maths
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Vertex2Dstatic Vertexstatic intclamp(int min, int max, int val)static floatmax(float... y)static intmax(int... y)static floatmin(float... y)static intmin(int... y)static Vertexstatic Vertex2DreverseBilinear(Vertex2D point, Quad quad)The vertecies in quad need to be in order such that the first vertx is 0,0 in the texture the clockwise aroundstatic Vertex2Dstatic Vertex2Dstatic Vertex
-
Constructor Details
-
Maths
public Maths()
-
-
Method Details
-
min
public static int min(int... y) -
max
public static int max(int... y) -
min
public static float min(float... y) -
max
public static float max(float... y) -
clamp
public static int clamp(int min, int max, int val) -
subtract
-
add
-
normalize
-
subtract
-
add
-
scale
-
reverseBilinear
The vertecies in quad need to be in order such that the first vertx is 0,0 in the texture the clockwise aroundsee http://iquilezles.org/www/articles/ibilinear/ibilinear.htm
- Parameters:
point- point to get the uv ofquad- where the point is- Returns:
- uv from 0 to 1
-