Skip to content

RandomUtils.NextFloat(this Random) can return exactly 1 #166

Closed

Description

@skyoxZ

return rand.NextDouble().ToFloat();

It seems RandomUtils.NextFloat(this Random) has a possibility of returning exactly 1.

Activity

  1. added this to the 0518 milestone on May 16, 2018
  2. TomFinley commented on May 16, 2018

    @TomFinley
    Contributor

    Thanks @skyoxZ !

    To whoever works on this, I'd prefer to address this problem just by removing this extension method and the IRandom extension method above. Ideally we could perhaps get rid of RandomUtils altogether; I don't see that it serves any purpose. (Indeed the offending method is not used anywhere, near as I can tell. I'd think anyone outside utilizing this should use something else.)

  3. ghost locked as resolved and limited conversation to collaborators on Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingquestionFurther information is requested

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions