Roll: Difference between revisions
Jump to navigation
Jump to search
no edit summary
Miraheze>Adám Brudzewsky mNo edit summary |
Miraheze>Adám Brudzewsky No edit summary |
||
Line 1: | Line 1: | ||
{{Primitive|?|Roll}} is a [[monadic]] [[scalar function]] which returns random or pseudo-random numbers. Each [[scalar]] in the argument must be a non-negative integer. If it is a positive number <source lang=apl inline>n</source>, then Roll chooses one of the first <source lang=apl inline>n</source> [[Index|indices]] | {{Primitive|?|Roll}} is a [[monadic]] [[scalar function]] which returns random or pseudo-random numbers. Each [[scalar]] in the argument must be a non-negative integer. If it is a positive number <source lang=apl inline>n</source>, then Roll chooses one of the first <source lang=apl inline>n</source> [[Index|indices]]. In some dialects Roll chooses a floating-point number between 0 and 1 when the argument has a zero. | ||
== Examples == | == Examples == |