internal static double CalculateSquareDistance(CoordPoint a, CoordPoint b) { double dx = b.GetX() - a.GetX(); double dy = b.GetY() - a.GetY(); return(dx * dx + dy * dy); }
void UpdateClip(double width) { CoordPoint newSplit = this.map.ScreenPointToCoordPoint(new Point(width, 0)); double splitLongitude = newSplit.GetX(); this.left.Bounds = new CoordPointCollection() { new GeoPoint(-90, -180), new GeoPoint(90, -180), new GeoPoint(90, splitLongitude), new GeoPoint(-90, splitLongitude) }; this.right.Bounds = new CoordPointCollection() { new GeoPoint(-90, 180), new GeoPoint(90, 180), new GeoPoint(90, splitLongitude), new GeoPoint(-90, splitLongitude) }; }
public static double CalculateSquare(CoordPoint a, CoordPoint b, CoordPoint c) { return(0.5 * Math.Abs((a.GetX() - b.GetX()) * (c.GetY() - b.GetY()) - (c.GetX() - b.GetX()) * (a.GetY() - b.GetY()))); }