Class DefaultInterpolator

    • Method Detail

      • interpolate

        public float interpolate​(float initial,
                                 float a,
                                 float b,
                                 float progress)
        Specified by:
        interpolate in interface FloatInterpolator
      • ensureCacheCapacity

        private static float @NotNull [] ensureCacheCapacity​(float @Nullable [] cache,
                                                             int length)
      • arrayLerp

        private static float @NotNull [] arrayLerp​(float @Nullable [] cache,
                                                   float @NotNull [] from,
                                                   float @Nullable [] to,
                                                   float progress)
      • saxpy

        private static float @NotNull [] saxpy​(float @Nullable [] cache,
                                               float @NotNull [] b,
                                               float @Nullable [] x,
                                               float a)
        This method is used to calculate the result of the following operation: result_i = a * x_i + b_i
        • If b_i is shorter than a_i, b_i is repeated.
        • If b_i is longer than a_i, the extra values are ignored.
      • interpolate

        public float @NotNull [] interpolate​(float @NotNull [] initial,
                                             float @NotNull [] a,
                                             float @Nullable [] b,
                                             float progress,
                                             float @Nullable [] cache)
        Specified by:
        interpolate in interface FloatListInterpolator
      • extractColor

        @Nullable
        private static @Nullable RGBColor extractColor​(@NotNull
                                                       @NotNull SVGPaint p)
      • discreteAnimation

        private SVGPaint discreteAnimation​(@NotNull
                                           @NotNull SVGPaint initial,
                                           @NotNull
                                           @NotNull SVGPaint a,
                                           @NotNull
                                           @NotNull SVGPaint b,
                                           float progress)