Announcement

Collapse
No announcement yet.

No random Bytes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    No random Bytes

    If bytes are the best way to handle numbers why is there no "random byte" option or am i missing something.

    #2
    A random byte is only a random number between 1 and 8, yes?.
    I'm @londonisunreal, the organiser of the London Unreal Engine Meetup group.

    Comment


      #3
      Originally posted by Jezcentral View Post
      A random byte is only a random number between 1 and 8, yes?.
      Apparently no.

      Byte values are integer numbers in the range 0 to 255, in other words unsigned 8 bit values.

      So to add two random bytes you have to, 2 random int into byte+byte.

      Comment


        #4
        Oh right, you mean a Short. Numbers can be held in different ways, there are also Floats, Doubles, Ints, Longs etc. If you want to know more, just look up data primitives, and you'll see why they are used. But they are just different ways to store numbers. You don't gain anything by generating random bytes.
        I'm @londonisunreal, the organiser of the London Unreal Engine Meetup group.

        Comment


          #5
          Would you not gain in a reduction in memory used? That was my thinking.

          Comment

          Working...
          X