Class FloatGlider

java.lang.Object
com.github.yellowstonegames.smooth.Glider
com.github.yellowstonegames.smooth.FloatGlider

public class FloatGlider extends Glider
Allows specifying a smoothly-changing float value using any float for the start and the end, with a change amount that affects how far the value has changed from start to end. Typical usage sets the start with setStart(float) once and the end more than once with setEnd(float), changing the end each time the transition is complete. The value is automatically calculated in getValue(), and its value will be different every time Glider.setChange(float) is called with a different amount. You can optionally use an Interpolations.Interpolator to make the rate of change different.
This is a type of Glider, and so is compatible with other Gliders (it can also be merged with them).
  • Constructor Details

    • FloatGlider

      public FloatGlider()
    • FloatGlider

      public FloatGlider(float start)
    • FloatGlider

      public FloatGlider(float start, float end)
  • Method Details

    • getValue

      public float getValue()
    • getStart

      public float getStart()
    • setStart

      public void setStart(float start)
    • getEnd

      public float getEnd()
    • setEnd

      public void setEnd(float end)