Package-level declarations

Functions

Link copied to clipboard
fun List<Pair<Double, Double>>.simplify(tolerance: Double = 1.0, highestQuality: Boolean = false): List<Pair<Double, Double>>

For a List of Pair returns a List representing the simplified polyline. It is strongly encouraged to use simplify on your own data types with your own xExtractor and yExtractor to avoid making unnecessary copies of large data sets.

inline fun <T> List<T>.simplify(tolerance: Double = 1.0, highestQuality: Boolean = false, crossinline xExtractor: (T) -> Double, crossinline yExtractor: (T) -> Double, crossinline xTransformer: (Double) -> Double = { it }, crossinline yTransformer: (Double) -> Double = { it }): List<T>

For a List returns a List of simplified points. This is a direct port of simplify-js and should function the same.