BitOnInteger (Float function): Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Template:Float:BitOnInteger subtitle}} The <var>BitOnInteger</var> intrinsic function turns on a set of bits in an integer as indicated by another. ==Sy...") |
m (→Syntax terms) |
||
Line 10: | Line 10: | ||
<tr><th>float</th><td>The float to turn on bits in.</td></tr> | <tr><th>float</th><td>The float to turn on bits in.</td></tr> | ||
<tr><th> | <tr><th>onBits</th><td>The bits to turn on.</td></tr> | ||
</table> | </table> |
Revision as of 10:40, 30 March 2011
Set bits in one integer from another (Float class) [introduced in Sirius Mods 7.9]
The BitOnInteger intrinsic function turns on a set of bits in an integer as indicated by another.
Syntax
%result = float:BitOnInteger( onBits)
Syntax terms
%result | A variable to receive the result of turning on the bits of onBits in float. |
---|---|
float | The float to turn on bits in. |
onBits | The bits to turn on. |
Usage notes
- The BitOnInteger function is available as of Sirius Mods Version 7.9
Examples
- The following statement rounds an integer up to the nearest odd integer:
%y = %x:bitOnInteger(1)