doc/rdoc/classes/RFuzz/RandomGenerator.src/M000057.html in rfuzz-0.8 vs doc/rdoc/classes/RFuzz/RandomGenerator.src/M000057.html in rfuzz-0.9

- old
+ new

@@ -3,16 +3,20 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>floats (RFuzz::RandomGenerator)</title> + <title>ints (RFuzz::RandomGenerator)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> - <pre> <span class="ruby-comment cmt"># File lib/rfuzz/random.rb, line 105</span> -105: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">floats</span>(<span class="ruby-identifier">count</span>) -106: <span class="ruby-ivar">@rnd</span>.<span class="ruby-identifier">data</span>(<span class="ruby-identifier">count</span> <span class="ruby-operator">*</span> <span class="ruby-value">8</span>).<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">&quot;G*&quot;</span>) -107: <span class="ruby-keyword kw">end</span></pre> + <pre> <span class="ruby-comment cmt"># File lib/rfuzz/random.rb, line 96</span> + 96: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ints</span>(<span class="ruby-identifier">count</span>, <span class="ruby-identifier">max</span> = <span class="ruby-keyword kw">nil</span>) + 97: <span class="ruby-identifier">i</span> = <span class="ruby-ivar">@rnd</span>.<span class="ruby-identifier">data</span>(<span class="ruby-identifier">count</span> <span class="ruby-operator">*</span> <span class="ruby-value">4</span>).<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">&quot;N*&quot;</span>) + 98: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">max</span> + 99: <span class="ruby-identifier">i</span> = <span class="ruby-identifier">i</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">max</span> } +100: <span class="ruby-keyword kw">end</span> +101: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">i</span> +102: <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file