BitOnInteger and BitOrInteger (Float functions)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Bitwise Or of integers (Float class)
[Introduced in Sirius Mods 7.9]
These intrinsic functions perform a logical OR of the binary bits of two integers: that is, if the bits are "on" in either of the inputs, they are "on" in the output integer.
%result = float:BitOnInteger( onBits)
%result = float:BitOrInteger( orBits)
|%result||A variable to receive the result of ORing together the bits of float and onBits (or of float and orBits).|
|onBits||An integer to be ORed with float.|
|orBits||An integer to be ORed with float.|
- The BitOrInteger function is available as of Sirius Mods Version 7.9
%x = 10, the following statements each produce the integer
%num = %x:bitOnInteger(16)} %num = %x:bitOnInteger(18)}
- The following statement rounds an integer up to the nearest odd integer:
%y = %x:bitOnInteger(1)