Skip to content

Allow Random.number(10, 1), or throw? #17

@tabatkins

Description

@tabatkins

Should we allow calls of the form Random.number(10, 1), in addition to the standard Random.number(1, 10)? In the most naive version of the method (return Random.random()*(b - a) + a), this Just Works automatically; the b-a term ends up negative and counts down from the (higher) a value, so you still cover the same range either way. (Modulo the edge values, possibly.)

I'm inclined to allow it.

Metadata

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