C# Class Mapsui.Geometries.Utilities.Algorithms

Mostra file Open project: pauldendulk/Mapsui

Public Methods

Method Description
DegreesToRadians ( double degrees ) : double

Converts the specified angle from degrees to radians

Distance ( double x1, double y1, double x2, double y2 ) : double

Gets the euclidean distance between two points.

DistanceToLine ( System.Point point, List points ) : double
IsCCW ( LinearRing ring ) : bool

Tests whether a ring is oriented counter-clockwise.

PointInPolygon ( List ring, System.Point point ) : bool
RotateClockwiseDegrees ( double x, double y, double degrees ) : System.Point

Rotates the specified point clockwise about the origin

RotateClockwiseRadians ( double x, double y, double radians ) : System.Point

Rotates the specified point clockwise about the origin

Method Details

DegreesToRadians() public static method

Converts the specified angle from degrees to radians
public static DegreesToRadians ( double degrees ) : double
degrees double Angle to convert (degrees)
return double

Distance() public static method

Gets the euclidean distance between two points.
public static Distance ( double x1, double y1, double x2, double y2 ) : double
x1 double The first point's X coordinate.
y1 double The first point's Y coordinate.
x2 double The second point's X coordinate.
y2 double The second point's Y coordinate.
return double

DistanceToLine() public static method

public static DistanceToLine ( System.Point point, List points ) : double
point System.Point
points List
return double

IsCCW() public static method

Tests whether a ring is oriented counter-clockwise.
public static IsCCW ( LinearRing ring ) : bool
ring LinearRing Ring to test.
return bool

PointInPolygon() public static method

public static PointInPolygon ( List ring, System.Point point ) : bool
ring List
point System.Point
return bool

RotateClockwiseDegrees() public static method

Rotates the specified point clockwise about the origin
public static RotateClockwiseDegrees ( double x, double y, double degrees ) : System.Point
x double X coordinate to rotate
y double Y coordinate to rotate
degrees double Angle to rotate (degrees)
return System.Point

RotateClockwiseRadians() public static method

Rotates the specified point clockwise about the origin
public static RotateClockwiseRadians ( double x, double y, double radians ) : System.Point
x double X coordinate to rotate
y double Y coordinate to rotate
radians double Angle to rotate (radians)
return System.Point