Skip to content

randomInt returns a negative number #7

@dispalt

Description

@dispalt

Looking at the go code, the random int they generate is positive only. Which makes sense. So I think changing the code to something like would be better.

    def randomInt: Int = {
      val maxInt = 0xff << 16 | 0xff << 8 | 0xff
      Random.nextInt(maxInt)
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions