Gestionnaire de fichiers - Editer - /opt/cpanel/ea-ruby24/root/usr/share/ri/system/Kernel/rand-i.ri
Arrière
U:RDoc::AnyMethod[iI" rand:ETI"Kernel#rand;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"KIf called without an argument, or if <tt>max.to_i.abs == 0</tt>, rand ;TI"Hreturns a pseudo-random floating point number between 0.0 and 1.0, ;TI"%including 0.0 and excluding 1.0.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"(rand #=> 0.2725926052826416 ;T:@format0o; ; [I"RWhen +max.abs+ is greater than or equal to 1, +rand+ returns a pseudo-random ;TI"Einteger greater than or equal to 0 and less than +max.to_i.abs+.;T@o;; [I"rand(100) #=> 12 ;T; 0o; ; [I"AWhen +max+ is a Range, +rand+ returns a random number where ;TI"#range.member?(number) == true.;T@o; ; [I"KNegative or floating point values for +max+ are allowed, but may give ;TI"surprising results.;T@o;; [I"rand(-100) # => 87 ;TI"(rand(-0.5) # => 0.8130921818028143 ;TI";rand(1.9) # equivalent to rand(1), which is always 0 ;T; 0o; ; [I"MKernel.srand may be used to ensure that sequences of random numbers are ;TI"6reproducible between different runs of a program.;T@o; ; [I"See also Random.rand.;T: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I"rand(max=0) -> number ;T0[ I"(*args);T@/FI"Kernel;TcRDoc::NormalModule00
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Génération de la page: 0 |
proxy
|
phpinfo
|
Réglages