[][src]Function meshopt::utilities::quantize_snorm

pub fn quantize_snorm(v: f32, n: u32) -> i32

Quantize a float in [-1..1] range into an N-bit fixed point snorm value.

Assumes reconstruction function (q / (2^(N-1)-1)), which is the case for fixed-function normalized fixed point conversion (except early OpenGL versions).

Maximum reconstruction error: 1/2^N.