We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b64539 commit c3e251dCopy full SHA for c3e251d
doc/Type/Range.pod6
@@ -309,6 +309,17 @@ L«C<.excludes-max>|/type/Range#method_excludes-max»,
309
L«C<.infinite>|/type/Range#method_infinite», and
310
L«C<.is-int>|/type/Range#method_is-int» as named arguments.
311
312
+=head2 method rand
313
+
314
+Defined as:
315
316
+ method rand(Range:D --> Num:D)
317
318
+Returns a pseudo-random value belongs to the range.
319
320
+ say (1^..5).rand; # OUTPUT: «1.02405550417031»
321
+ say (0.1..0.3).rand; # OUTPUT: «0.2130353370062»
322
323
=end pod
324
325
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
0 commit comments