Class MiscUtils


  • public class MiscUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      MiscUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PointF addPoints​(PointF p1, PointF p2)  
      static double clamp​(double number, double min, double max)  
      static float clamp​(float number, float min, float max)  
      static int clamp​(int number, int min, int max)  
      static boolean contains​(float number, float rangeMin, float rangeMax)  
      static void getPathFromData​(ShapeData shapeData, Path outPath)  
      static double lerp​(double a, double b, double percentage)  
      static float lerp​(float a, float b, float percentage)  
      static int lerp​(int a, int b, float percentage)  
      static void resolveKeyPath​(KeyPath keyPath, int depth, java.util.List<KeyPath> accumulator, KeyPath currentPartialKeyPath, KeyPathElementContent content)
      Helper method for any KeyPathElementContent that will check if the content fully matches the keypath then will add itself as the final key, resolve it, and add it to the accumulator list.
      • Methods inherited from class java.lang.Object

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

      • MiscUtils

        public MiscUtils()
    • Method Detail

      • getPathFromData

        public static void getPathFromData​(ShapeData shapeData,
                                           Path outPath)
      • lerp

        public static float lerp​(float a,
                                 float b,
                                 float percentage)
      • lerp

        public static double lerp​(double a,
                                  double b,
                                  double percentage)
      • lerp

        public static int lerp​(int a,
                               int b,
                               float percentage)
      • clamp

        public static int clamp​(int number,
                                int min,
                                int max)
      • clamp

        public static float clamp​(float number,
                                  float min,
                                  float max)
      • clamp

        public static double clamp​(double number,
                                   double min,
                                   double max)
      • contains

        public static boolean contains​(float number,
                                       float rangeMin,
                                       float rangeMax)