Class EasingCurves


  • public final class EasingCurves
    extends java.lang.Object
    This class provides static functions for the most common easing curves used around the world and on most design guides, such as Google's Material Design [1] In curves are used to approach a value at maximum speed Out curves are used to approach a value at zero speed InOut curves mixes the in and out curves, creating a S-shaped curve Elastic curves extrapolate both begin and end values a little for a visually pleasant effect Bounce curves arrive at the end value multiple times before settling in, creating a bouncy effect. Illustrations of these curves can be seen at [2] For a reference implementation, see [3] All easing curves take 4 parameters: the begin and end values, the animation duration and the position we want to evaluate on the curve References: [1] https://material.io/guidelines/motion/duration-easing.html [2] http://easings.net [3] https://github.com/daimajia/AnimationEasingFunctions
    • Constructor Summary

      Constructors 
      Constructor Description
      EasingCurves()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double InOutQuadratic​(double begin, double end, double duration, double t)
      Quadratic InOut Curve.
      static double InQuadratic​(double begin, double end, double duration, double t)
      Quadratic In Curve.
      static double OutQuadratic​(double begin, double end, double duration, double t)
      Quadratic Out Curve.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EasingCurves

        public EasingCurves()
    • Method Detail

      • InQuadratic

        public static double InQuadratic​(double begin,
                                         double end,
                                         double duration,
                                         double t)
        Quadratic In Curve.
        Parameters:
        begin - starting value
        end - ending value
        duration - duration
        t - current time (0 <= t < duration)
        Returns:
      • OutQuadratic

        public static double OutQuadratic​(double begin,
                                          double end,
                                          double duration,
                                          double t)
        Quadratic Out Curve.
        Parameters:
        begin - starting value
        end - ending value
        duration - duration
        t - current time (0 <= t < duration)
        Returns:
      • InOutQuadratic

        public static double InOutQuadratic​(double begin,
                                            double end,
                                            double duration,
                                            double t)
        Quadratic InOut Curve.
        Parameters:
        begin - starting value
        end - ending value
        duration - duration
        t - current time (0 <= t < duration)
        Returns: