mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 06:26:41 +00:00
Version 4.7.0: Added UWP Vector class
This commit is contained in:
parent
32db0f22c1
commit
9c148e13c4
21 changed files with 154 additions and 93 deletions
|
|
@ -15,14 +15,39 @@ namespace MapControl
|
|||
Y = y;
|
||||
}
|
||||
|
||||
public static implicit operator Windows.Foundation.Point(Point p)
|
||||
{
|
||||
return new Windows.Foundation.Point(p.X, p.Y);
|
||||
}
|
||||
|
||||
public static implicit operator Point(Windows.Foundation.Point p)
|
||||
{
|
||||
return new Point(p.X, p.Y);
|
||||
}
|
||||
|
||||
public static implicit operator Windows.Foundation.Point(Point p)
|
||||
public static explicit operator Point(Vector v)
|
||||
{
|
||||
return new Windows.Foundation.Point(p.X, p.Y);
|
||||
return new Point(v.X, v.Y);
|
||||
}
|
||||
|
||||
public static Point operator -(Point p)
|
||||
{
|
||||
return new Point(-p.X, -p.Y);
|
||||
}
|
||||
|
||||
public static Point operator +(Point p, Vector v)
|
||||
{
|
||||
return new Point(p.X + v.X, p.Y + v.Y);
|
||||
}
|
||||
|
||||
public static Point operator -(Point p, Vector v)
|
||||
{
|
||||
return new Point(p.X - v.X, p.Y - v.Y);
|
||||
}
|
||||
|
||||
public static Vector operator -(Point p1, Point p2)
|
||||
{
|
||||
return new Vector(p1.X - p2.X, p1.Y - p2.Y);
|
||||
}
|
||||
|
||||
public static bool operator ==(Point p1, Point p2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue