Skip to content

math/rand: unclear documentation on Int31n & associated method familly #26765

@ladydascalie

Description

@ladydascalie

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.10.3 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

Not relevant, documentation related

What did you do?

I read the following piece of documentation:

Int31n returns, as an int32, a non-negative pseudo-random number in [0,n). It panics if n <= 0.

What did you expect to see?

I expected to understand the meaning of n in that context.

What did you see instead?

I didn't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.help wanted

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions