public T [ ] simplify ( T [ ] points , double tolerance , boolean highestQuality ) { if ( points == null || points . length <= 2 ) { return points ; } double sqTolerance = tolerance * tolerance ; if ( ! highestQuality ) { points = simplifyRadialDistance ( points , sqTolerance ) ; } points = simplifyDouglasPeucker ( points , sqTolerance ) ; return points ; }
Simplifies a list of points to a shorter list of points .