28.2.51 __builtin_flim_32
Architecture
dsPIC33A
Description
Force (Signed) Data Range Limit. Simultaneously compares a 32-bit signed data value to a maximum signed limit value and a minimum signed limit value.
If the data value is greater than the maximum, the data value is set to the maximum value.
If the data value is less than the minimum, the data value is set to the minimum value.
If the data value is within the maximum-minimum values, the data value is not changed.
Prototype
int32_t __builtin_flim(int32_t value, int32_t high, int32_t low);
Arguments
value
– Data value
high
– Maximum limit value
low
– Minimum limit value
Return Value
Returns value
clamped between high
and
low
.
Machine Instruction
flim.l
Error Messages
None