simplify
inline fun simplify(n: Int, tolSq: Double, keep: BooleanArray, stack: IntList = IntList(), xAt: (Int) -> Double, yAt: (Int) -> Double)
Mark the survivors of simplifying the n-vertex ring/line in keep (size >= n); endpoints are always kept. tolSq is the SQUARED tolerance in the coordinate space of xAt/yAt. stack (DP explicit-recursion) is a reusable buffer (cleared here).
Inline so the per-vertex accessors fold into the hot loops with no allocation or virtual dispatch on any target (the MVT decoder reads integer tile coords, WFS reads degree doubles).