Skip to content

Random.natIn that is inclusive of upper value #170

Open
@ceedubs

Description

I would like to generate a Nat with an inclusive upper value of maxNat. Is there a straightforward way to do that currently? Since natIn lower upper is exclusive on upper, you can't do natIn lower maxNat. For cases other than maxNat, you could do natIn lower (increment upper), but this will overflow and give an error if upper is maxNat.

See also #169.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions