Converts a number to a 32-bit integer in the range -(2^ 31) to (2^ 31)-1.
Result of the conversion.
This output assumes the same data type structure as number.
This node rounds all floating-point numeric values to the nearest integer. If the fractional part of the floating-point value is .5, the node rounds the value to the nearest even integer. For example, the node rounds 13.5 to 14 and rounds 14.5 to 14.
If this node receives an input value that falls outside of the range of values that the output can represent, the node returns a value that wraps to the other end of the range. This differs from the behavior for nodes that convert values to unsigned integers.
number | 32-bit integer (range: -(2^31) to (2^31)-1) | Comments |
---|---|---|
0 | 0 | number is within the allowable range, so no value change occurs. |
1 | 1 | Same as above. |
... | ... | ... |
(2^31)-2 | (2^31)-2 | Same as above. |
(2^31)-1 | (2^31)-1 | number is the maximum allowable value, so no value change occurs. |
2^31 | -(2^31) | number exceeds the maximum allowable value by 1, so the node returns the first allowable value at the bottom of the range. |
(2^31)+1 | -(2^31)+1 | number exceeds the maximum allowable value by 2, so the node returns the second allowable value at the bottom of the range. |
-(2^31)+1 | -(2^31)+1 | number is within the allowable range, so no value change occurs. |
-(2^31) | -(2^31) | number is the minimum allowable value, so no value change occurs. |
-(2^31)-1 | (2^31)-1 | number undershoots the minimum allowable value by 1, so the node returns the first allowable value at the top of the range. |
-(2^31)-1 | (2^31)-2 | number undershoots the minimum allowable value by 2, so the node returns the second allowable value at the top of the range. |
13.7 | 14 | The node rounds 13.7 up to 14 because 14 is the nearest integer. |
13.5 | 14 | The node rounds 13.5 up to 14 because 14 is the nearest even integer. |
14.5 | 14 | The node rounds 14.5 down to 14 because 14 is the nearest even integer. |
Where This Node Can Run:
Desktop OS: Windows
FPGA: DAQExpress does not support FPGA devices