quantize

fun FloatArray.quantize(scale: Float, zeroPoint: Int): ByteArray

Quantizes the FloatArray into a ByteArray using the given scale and zeroPoint.

Formula: round(value / scale + zeroPoint) coerced to [-128, 127].