RTOI – Real to integer number conversion
Block SymbolLicensing group: STANDARD
Function Description
The RTOI block converts the real number r to a signed integer number i. The resulting
rounded value is defined by:
where (r) stands for rounding to the nearest integer number. The number of the form +0.5 ( is integer) is rounded to the integer number with the higher absolute value, i.e. , .
Note that the numbers and correspond with the lowest and the highest signed number representable in 32-bit format respectively (0x7FFFFFFF and 0x80000000 in hexadecimal form in the C language). This limits are valid if the vtype parameter has default value. Limits of selected data type is applied in other cases.
Input
r | Analog input of the block | Double (F64) |
Parameters
vtype | Output numeric type 4 | Long (I32) |
|
|
|
SAT | Saturation (overflow) checking on | Bool |
Output
i | Rounded and converted input signal | Long (I32) |
[Previous] [Back to top] [Up] [Next]
2023 © REX Controls s.r.o., www.rexygen.com