5.3.16 _Q15ftoi Function
This function converts a single precision floating-point value into its corresponding Q15 value.
Include
<libq.h>
Prototype
_Q15 _Q15ftoi(float x);
Argument
x |
a floating-point equivalent number. The corresponding floating-point range is -1 to 0.99996. |
Return Value
This function returns a fixed-point number in Q15 format. The value ranges from -32768 to 32767.