Results 1 to 28 of 28

Thread: I have never understood bit operations.

Threaded View

  1. #26

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819

    Re: I have never understood bit operations.

    I'm going to pass on this method although I can see it has a lot of value for other things.

    But it would require translation and conversion because everything in the program is die-rolls that return 1 through number of die sides.

    nDieRoll = RollDie(d6)

    ShuffleType = 2 ^ (nDieRoll - 1) '

    Just to check my math.

    rolls

    1: (2 ^ (1 - 1) = 1
    2: (2 ^ (2 - 1) = 2
    3: (2 ^ (3 - 1) = 4
    4: (2 ^ (4 - 1) = 8
    5: etc..
    6:

    Actually it's not so bad since this is done in only one Function. All functions called by this function are sent the enum value, not the die roll.
    Last edited by cafeenman; May 20th, 2025 at 03:47 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width