Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #8
Browse files Browse the repository at this point in the history
resolves #6 and #7
  • Loading branch information
nexussays authored Dec 30, 2017
2 parents 50c88c8 + df203bf commit e7e189a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nexus/math/Random.as
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public class Random
* @param max The highest value to return, exclusive
* @return An int in the range [min, max)
*/
public function integer(min:uint = 0, max:int = int.MAX_VALUE):int
public function integer(min:int = 0, max:int = int.MAX_VALUE):int
{
return m_generator.next() % (max - min) + min;
}
Expand Down Expand Up @@ -120,12 +120,12 @@ public class Random
var choice:int;
if(items.length == 1)
{
choice = integer(0, items[0].length - 1);
choice = integer(0, items[0].length);
return items[0][choice];
}
else
{
choice = integer(0, items.length - 1);
choice = integer(0, items.length);
return items[choice];
}
}
Expand Down

0 comments on commit e7e189a

Please sign in to comment.