Results 1 to 11 of 11

Thread: [RESOLVED] Random

Threaded View

  1. #4
    Frenzied Member
    Join Date
    May 2014
    Location
    Central Europe
    Posts
    1,388

    Re: Random

    Code:
    x = BitConverter.Touint32(byteVal.ToArray, 0)
    y = BitConverter.Touint32(byteVal.ToArray, 4)
    rv = x / y
    add code to care about the edge cases (y=0 and x=y if you do not want 1 as possible result)

    edit: of course you need to exchange x and y if x > y so that y is always bigger or equal x. But i guess you get the point.
    Last edited by digitalShaman; Dec 3rd, 2023 at 04:05 AM.

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