5.3.85 _Q31ftoi Function

This function converts a single precision floating-point value into its corresponding Q31 value.

Include

<libq.h>

Prototype

_Q31 _Q31ftoi(float x);

Argument

x a floating-point equivalent number. The corresponding floating-point range is -1 to 0.99999996.

Return Value

This function returns a fixed-point number in Q31 format. The value ranges from -2147483648 to 2147483647.