| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
Math.BitwiseRotate
Rotates the bits in a 64-bit integer number.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| Math | 15.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "Math.BitwiseRotate"; Value; Bits ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| Value | The value to rotate. | 123 |
| Bits | The number of bits to rotate. From 0 to 63. |
1 |
Result
Returns number or error.
Description
Rotates the bits in a 64-bit integer number.Version 15.3 only rotates left. With 15.4 can rotate right, too.
Examples
Rotate one to left:
MBS( "Math.BitwiseRotate"; 123; 1 )
Example result: 246
Example result: 246
Rotate right:
MBS( "Math.BitwiseRotate"; 128; -1 )
Example result: 64
Example result: 64
Release notes
- Version 15.4
- Fixed Math.BitwiseRotate to better rotate to right.
- Version 15.3
- Added Math.BitwiseRotate function.
Blog Entries
This function is free to use.
Created 22nd May 2025, last changed 17th July 2025