bilinearSample

fun bilinearSample(values: DoubleArray, width: Int, height: Int, x: Double, y: Double): Double(source)

Bilinearly samples a row-major width x height grid of values at grid coordinates (x, y), where x ranges over 0 until width and y over 0 until height. Positions outside that range are clamped.