Code archives/Miscellaneous/ROR/ROL
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
Based on a thread found here: http://www.blitzbasic.com/Community/posts.php?topic=79319 I tought I'd take ImaginaryHuman's example code and adapt it to Blitz3D for all to use... (not that it was a big task) | |||||
Function ROR%(Value% = 0, Bits% = 0) Return ((Value Shr Bits) Or (Value Shl (32-Bits))) ;Rotate integer To the Right End Function Function ROL%(Value% = 0, Bits% = 0) Return ((Value Shl Bits) Or (Value Shr (32-Bits))) ;Rotate integer To the Left End Function |
Comments
None.
Code Archives Forum