Class SmoothNoise
java.lang.Object
de.cheaterpaul.fallingleaves.math.SmoothNoise
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected floatprotected final FloatFunctionprotected floatprotected floatprotected final intprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatfloatgetLerp()Linear interpolation between left and right noise valuesfloatgetNoise()Smooth interpolation between left and right noise valuesfloatstatic floatsmoothstep(float t) Smoothly goes from 0 to 1 when t increases from 0 and 1.voidtick()
-
Field Details
-
tickInterval
protected final int tickInterval -
nextNoise
-
leftNoise
protected float leftNoise -
rightNoise
protected float rightNoise -
ticks
protected int ticks -
t
protected float t
-
-
Constructor Details
-
SmoothNoise
-
-
Method Details
-
smoothstep
public static float smoothstep(float t) Smoothly goes from 0 to 1 when t increases from 0 and 1. Defined for t in [0, 1]. -
tick
public void tick() -
getLeftNoise
public float getLeftNoise() -
getRightNoise
public float getRightNoise() -
getLerp
public float getLerp()Linear interpolation between left and right noise values -
getNoise
public float getNoise()Smooth interpolation between left and right noise values
-