Skip to content

Commit

Permalink
Fix uses of PM_PRNG to work with the publicly available version inste…
Browse files Browse the repository at this point in the history
…ad of my version (which has a small change).
  • Loading branch information
amitp committed Jun 10, 2011
1 parent 69a0dfa commit ef3d891
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Map.as
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ package {
// initial map upon loading is always deterministic, but
// subsequent maps reset this random number generator with a
// random seed.
public var mapRandom:PM_PRNG = new PM_PRNG(100);
public var mapRandom:PM_PRNG = new PM_PRNG();

// These store the graph data
public var points:Vector.<Point>; // Only useful during map construction
Expand Down Expand Up @@ -824,7 +824,8 @@ class IslandShape {
// The radial island radius is based on overlapping sine waves
static public var ISLAND_FACTOR:Number = 1.07; // 1.0 means no small islands; 2.0 leads to a lot
static public function makeRadial(seed:int):Function {
var islandRandom:PM_PRNG = new PM_PRNG(seed);
var islandRandom:PM_PRNG = new PM_PRNG();
islandRandom.seed = seed;
var bumps:int = islandRandom.nextIntRange(1, 6);
var startAngle:Number = islandRandom.nextDoubleRange(0, 2*Math.PI);
var dipAngle:Number = islandRandom.nextDoubleRange(0, 2*Math.PI);
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ History:
** Requirements:

* [My fork of as3delaunay](http://github.com/amitp/as3delaunay)
* de.polygonal.math.PM_PRNG.as
* The AS3 version of [de.polygonal.math.PM_PRNG.as](http://lab.polygonal.de/2007/04/21/a-good-pseudo-random-number-generator-prng/)

0 comments on commit ef3d891

Please sign in to comment.