Server : Apache System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 User : vapecompany ( 2719) PHP Version : 7.4.33 Disable Function : NONE Directory : /opt/alt/ruby18/share/ri/1.8/system/Kernel/ |
Upload File : |
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Converts <em>max</em> to an integer using max1 = max<tt>.to_i.abs</tt>. If the result is zero, returns a pseudorandom floating point number greater than or equal to 0.0 and less than 1.0. Otherwise, returns a pseudorandom integer greater than or equal to zero and less than max1. <tt>Kernel::srand</tt> may be used to ensure repeatable sequences of random numbers between different runs of the program. Ruby currently uses a modified Mersenne Twister with a period of 2**19937-1. - !ruby/struct:SM::Flow::VERB body: " srand 1234 #=> 0\n [ rand, rand ] #=> [0.191519450163469, 0.49766366626136]\n [ rand(10), rand(1000) ] #=> [6, 817]\n srand 1234 #=> 1234\n [ rand, rand ] #=> [0.191519450163469, 0.49766366626136]\n" full_name: Kernel#rand is_singleton: false name: rand params: | rand(max=0) => number visibility: public