mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Cleanup
This commit is contained in:
parent
b0b4e0ea89
commit
d916278845
4 changed files with 22 additions and 29 deletions
|
|
@ -16,9 +16,7 @@ namespace MapControl
|
|||
public class BoundingBox
|
||||
{
|
||||
private double south;
|
||||
private double west;
|
||||
private double north;
|
||||
private double east;
|
||||
|
||||
public BoundingBox()
|
||||
{
|
||||
|
|
@ -32,48 +30,40 @@ namespace MapControl
|
|||
East = east;
|
||||
}
|
||||
|
||||
public double West { get; set; }
|
||||
|
||||
public double East { get; set; }
|
||||
|
||||
public double South
|
||||
{
|
||||
get { return south; }
|
||||
set { south = Math.Min(Math.Max(value, -90d), 90d); }
|
||||
}
|
||||
|
||||
public double West
|
||||
{
|
||||
get { return west; }
|
||||
set { west = value; }
|
||||
}
|
||||
|
||||
public double North
|
||||
{
|
||||
get { return north; }
|
||||
set { north = Math.Min(Math.Max(value, -90d), 90d); }
|
||||
}
|
||||
|
||||
public double East
|
||||
{
|
||||
get { return east; }
|
||||
set { east = value; }
|
||||
}
|
||||
|
||||
public virtual double Width
|
||||
{
|
||||
get { return east - west; }
|
||||
get { return East - West; }
|
||||
}
|
||||
|
||||
public virtual double Height
|
||||
{
|
||||
get { return north - south; }
|
||||
get { return North - South; }
|
||||
}
|
||||
|
||||
public bool HasValidBounds
|
||||
{
|
||||
get { return south < north && west < east; }
|
||||
get { return South < North && West < East; }
|
||||
}
|
||||
|
||||
public virtual BoundingBox Clone()
|
||||
{
|
||||
return new BoundingBox(south, west, north, east);
|
||||
return new BoundingBox(South, West, North, East);
|
||||
}
|
||||
|
||||
public static BoundingBox Parse(string s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue