Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix uses of PM_PRNG to work with the publicly available version inste…

…ad of my version (which has a small change).
  • Loading branch information...
commit ef3d89137631db0b3326ff5aab1cdad64ab6e13e 1 parent 69a0dfa
@amitp authored
Showing with 4 additions and 3 deletions.
  1. +3 −2 Map.as
  2. +1 −1  README.md
View
5 Map.as
@@ -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
@@ -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);
View
2  README.md
@@ -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/)
Please sign in to comment.
Something went wrong with that request. Please try again.