code: @NonNull
    public static List<Point> simplify(@NonNull List<Point> points, double tolerance,
                                       boolean highestQuality) {
      if (points.size() <= 2) {
        return points;
      }
  
      double sqTolerance = tolerance * tolerance;
  
      points = highestQuality ? points : simplifyRadialDist(points, sqTolerance);
      points = simplifyDouglasPeucker(points, sqTolerance);
  
      return points;
    }
docs: Reduces the number of points in a polyline while retaining its shape, giving a performance
  boost when processing it and also reducing visual noise.
  
  @param points         an array of points
  @param tolerance      affects the amount of simplification (in the same metric as the point
  coordinates)
  @param highestQuality excludes distance-based preprocessing step which leads to highest quality
  simplification
  @return an array of simplified points
  @see <a href="http://mourner.github.io/simplify-js/">JavaScript implementation</a>
  @since 1.2.0