Package gaiasky.util.math
Class Interpolationd
java.lang.Object
gaiasky.util.math.Interpolationd
- Direct Known Subclasses:
Interpolationd.BounceOut,Interpolationd.Elastic,Interpolationd.Exp,Interpolationd.Pow,Interpolationd.Swing,Interpolationd.SwingIn,Interpolationd.SwingOut
public abstract class Interpolationd
extends java.lang.Object
Takes a linear value in the range of 0-1 and outputs a (usually) non-linear, interpolated value.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInterpolationd.Bouncestatic classInterpolationd.BounceInstatic classInterpolationd.BounceOutstatic classInterpolationd.Elasticstatic classInterpolationd.ElasticInstatic classInterpolationd.ElasticOutstatic classInterpolationd.Expstatic classInterpolationd.ExpInstatic classInterpolationd.ExpOutstatic classInterpolationd.Powstatic classInterpolationd.PowInstatic classInterpolationd.PowOutstatic classInterpolationd.Swingstatic classInterpolationd.SwingInstatic classInterpolationd.SwingOut -
Field Summary
-
Constructor Summary
Constructors Constructor Description Interpolationd() -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
linear
-
smooth
Aka "smoothstep". -
smooth2
-
smoother
By Ken Perlin. -
fade
-
pow2
-
pow2In
Slow, then fast. -
slowFast
-
pow2Out
Fast, then slow. -
fastSlow
-
pow2InInverse
-
pow2OutInverse
-
pow3
-
pow3In
-
pow3Out
-
pow3InInverse
-
pow3OutInverse
-
pow4
-
pow4In
-
pow4Out
-
pow5
-
pow5In
-
pow5Out
-
sine
-
sineIn
-
sineOut
-
exp10
-
exp10In
-
exp10Out
-
exp5
-
exp5In
-
exp5Out
-
circle
-
circleIn
-
circleOut
-
elastic
-
elasticIn
-
elasticOut
-
swing
-
swingIn
-
swingOut
-
bounce
-
bounceIn
-
bounceOut
-
-
Constructor Details
-
Interpolationd
public Interpolationd()
-
-
Method Details
-
apply
public abstract double apply(double a)- Parameters:
a- Alpha value between 0 and 1.
-
apply
public double apply(double start, double end, double a)- Parameters:
a- Alpha value between 0 and 1.
-