<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <id>tag:www.refactormycode.com,2007:users93</id>
  <link type="application/atom+xml" href="http://www.refactormycode.com/users/93" rel="self"/>
  <title>diskostu</title>
  <updated>Tue Oct 02 01:01:27 -0700 2007</updated>
  <entry>
    <id>tag:www.refactormycode.com,2007:Refactor190</id>
    <published>2007-10-02T01:01:27-07:00</published>
    <title>[Java] On Get a random number within a given interval</title>
    <content type="html">&lt;p&gt;Thanks for your infos Gordon - I'm not a very experienced Java programmer, so your &amp;quot;awful&amp;quot; is OK for me. Haven't tried my implementation with min=0 and max=2, so... thanks for your comment.&lt;/p&gt;

&lt;pre&gt;&lt;/pre&gt;</content>
    <author>
      <name>diskostu</name>
      <email>denny.kluge@gmail.com</email>
    </author>
    <link type="text/html" href="http://www.refactormycode.com/codes/35-get-a-random-number-within-a-given-interval/refactors/190" rel="alternate"/>
  </entry>
  <entry>
    <id>tag:www.refactormycode.com,2007:Code35</id>
    <published>2007-10-01T00:50:20-07:00</published>
    <updated>2012-01-08T03:30:43-08:00</updated>
    <title>[Java] Get a random number within a given interval</title>
    <content type="html">&lt;p&gt;The title sais it: you'll get a random number within a given min and max.&lt;/p&gt;

&lt;pre&gt;public static long randomNumber(int min, int max) {
	return Math.round((Math.random() * (max - min)) + min);
}&lt;/pre&gt;</content>
    <author>
      <name>diskostu</name>
      <email>denny.kluge@gmail.com</email>
    </author>
    <link type="text/html" href="http://www.refactormycode.com/codes/35-get-a-random-number-within-a-given-interval" rel="alternate"/>
  </entry>
</feed>

