Ooops
January 15, 2021, 06:15:44 PM

Author Topic: [bb] ROR/ROL by _33 [ 1+ years ago ]  (Read 440 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] ROR/ROL by _33 [ 1+ years ago ]
« on: June 29, 2017, 12:28:40 AM »
Title : ROR/ROL
Author : _33
Posted : 1+ years ago

Description : Based on a thread found here: <a href="../Community/posts7ce8.html?topic=79319" target="_blank">http://www.blitzbasic.com/Community/posts.php?topic=79319[/url]

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)


Code :
Code: BlitzBasic
  1. Function ROR%(Value% = 0, Bits% = 0)
  2.       Return ((Value Shr Bits) Or (Value Shl (32-Bits))) ;Rotate integer To the Right
  3. End Function
  4.  
  5. Function ROL%(Value% = 0, Bits% = 0)
  6.       Return ((Value Shl Bits) Or (Value Shr (32-Bits))) ;Rotate integer To the Left
  7. End Function


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal