_Q16ftoi Function

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

Include

<libq.h>

Prototype

_Q16 _Q16ftoi(float x);

Argument

x a fixed-point number in Q16 format. The value of this argument ranges from -32768 to 32768.

Return Value

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