Tabs -> spaces

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@268 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Dave Hoover
2007-06-26 00:07:47 +00:00
parent 0250be64ac
commit 717dc79c02
32 changed files with 191 additions and 191 deletions
@@ -86,14 +86,14 @@ public class AStarPathUtil
*/
public void considerSteps (int x, int y)
{
considerStep(x - 1, y - 1, DIAGONAL_COST);
considerStep(x, y - 1, ADJACENT_COST);
considerStep(x + 1, y - 1, DIAGONAL_COST);
considerStep(x - 1, y, ADJACENT_COST);
considerStep(x + 1, y, ADJACENT_COST);
considerStep(x - 1, y + 1, DIAGONAL_COST);
considerStep(x, y + 1, ADJACENT_COST);
considerStep(x + 1, y + 1, DIAGONAL_COST);
considerStep(x - 1, y - 1, DIAGONAL_COST);
considerStep(x, y - 1, ADJACENT_COST);
considerStep(x + 1, y - 1, DIAGONAL_COST);
considerStep(x - 1, y, ADJACENT_COST);
considerStep(x + 1, y, ADJACENT_COST);
considerStep(x - 1, y + 1, DIAGONAL_COST);
considerStep(x, y + 1, ADJACENT_COST);
considerStep(x + 1, y + 1, DIAGONAL_COST);
}
protected void considerStep (int x, int y, int cost)
@@ -186,8 +186,8 @@ public class AStarPathUtil
return getNodePath(bestpath);
}
// no path found
return null;
// no path found
return null;
}
/**
@@ -197,10 +197,10 @@ public class ArcPath extends TimedPath
gfx.setColor(Color.blue);
gfx.drawRect(x, y, width-1, height-1);
gfx.setColor(Color.yellow);
gfx.setColor(Color.yellow);
gfx.drawArc(x, y, width-1, height-1, 0, 360);
gfx.setColor(Color.red);
gfx.setColor(Color.red);
gfx.drawArc(x, y, width-1, height-1, 360-sangle, -delta);
}
@@ -115,7 +115,7 @@ public class LinePath extends TimedPath
// documentation inherited
public void paint (Graphics2D gfx)
{
gfx.setColor(Color.red);
gfx.setColor(Color.red);
gfx.drawLine(_source.x, _source.y, _dest.x, _dest.y);
}
@@ -309,16 +309,16 @@ public class LineSegmentPath
// documentation inherited
public void paint (Graphics2D gfx)
{
gfx.setColor(Color.red);
Point prev = null;
int size = size();
for (int ii = 0; ii < size; ii++) {
PathNode n = (PathNode)getNode(ii);
if (prev != null) {
gfx.setColor(Color.red);
Point prev = null;
int size = size();
for (int ii = 0; ii < size; ii++) {
PathNode n = (PathNode)getNode(ii);
if (prev != null) {
gfx.drawLine(prev.x, prev.y, n.loc.x, n.loc.y);
}
prev = n.loc;
}
prev = n.loc;
}
}
// documentation inherited
@@ -45,7 +45,7 @@ public class MathUtil
*/
public static int distanceSq (int x0, int y0, int x1, int y1)
{
return ((x1 - x0) * (x1 - x0)) + ((y1 - y0) * (y1 - y0));
return ((x1 - x0) * (x1 - x0)) + ((y1 - y0) * (y1 - y0));
}
/**
@@ -53,8 +53,8 @@ public class MathUtil
*/
public static float distance (int x0, int y0, int x1, int y1)
{
return (float)Math.sqrt(((x1 - x0) * (x1 - x0)) +
((y1 - y0) * (y1 - y0)));
return (float)Math.sqrt(((x1 - x0) * (x1 - x0)) +
((y1 - y0) * (y1 - y0)));
}
/**
@@ -70,7 +70,7 @@ public class MathUtil
*/
public static String lineToString (int x0, int y0, int x1, int y1)
{
return "(" + x0 + ", " + y0 + ") -> (" + x1 + ", " + y1 + ")";
return "(" + x0 + ", " + y0 + ") -> (" + x1 + ", " + y1 + ")";
}
/**
@@ -78,7 +78,7 @@ public class MathUtil
*/
public static String lineToString (Point p1, Point p2)
{
return lineToString(p1.x, p1.y, p2.x, p2.y);
return lineToString(p1.x, p1.y, p2.x, p2.y);
}
/**