Navigation Menu

Skip to content

Commit

Permalink
Change Edge.river to be an int, since it counts the number of rivers …
Browse files Browse the repository at this point in the history
…flowing through and is never a non-integer. Previously, NaN meant no river; now 0 means no river.
  • Loading branch information
amitp committed Sep 6, 2010
1 parent 7732af7 commit 1786959
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Map.as
Expand Up @@ -338,6 +338,7 @@ package {
// the edge from the voronoi library.
var edge:Edge = new Edge();
edge.index = edges.length;
edge.river = 0;
edges.push(edge);
edge.midpoint = vedge.p0 && vedge.p1 && Point.interpolate(vedge.p0, vedge.p1, 0.5);

Expand Down
2 changes: 1 addition & 1 deletion graph/Edge.as
Expand Up @@ -6,6 +6,6 @@ package graph {
public var v0:Corner, v1:Corner;
public var d0:Center, d1:Center;
public var midpoint:Point;
public var river:Number;
public var river:int;
};
}

0 comments on commit 1786959

Please sign in to comment.