← back to roto on ba3a.dev

fillGaps

fun fillGaps(values: List<Double?>): List<Double>

values with every null filled: linearly between the known values either side of a gap, and with the nearest known value before the first or after the last. Throws when none is known.