_Q16neg Function

This function negates a Q16 value with saturation. The value is saturated in the case where the input is -2147483648.

Include

<libq.h>

Prototype

_Q16 _Q16neg(_Q16 x);

Argument

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

Return Value

This function returns -x in Q16 format. The value ranges from -2147483648 to 2147483647.