worldarea: allow WorldArea to take 2 WorldPoints and calculate width and height
This commit is contained in:
@@ -88,6 +88,15 @@ public class WorldArea
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public WorldArea(WorldPoint swLocation, WorldPoint neLocation)
|
||||
{
|
||||
this.x = swLocation.getX();
|
||||
this.y = swLocation.getY();
|
||||
this.plane = swLocation.getPlane();
|
||||
this.width = neLocation.getX() - swLocation.getX();
|
||||
this.height = neLocation.getY() - swLocation.getY();
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes the shortest distance to another area.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user