Search Results for

    Show / Hide Table of Contents

    Class Algorithms

    Inheritance
    object
    Algorithms
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Mapsui.Utilities
    Assembly: Mapsui.dll
    Syntax
    public static class Algorithms

    Methods

    | Edit this page View Source

    DegreesToRadians(double)

    Converts the specified angle from degrees to radians

    Declaration
    public static double DegreesToRadians(double degrees)
    Parameters
    Type Name Description
    double degrees

    Angle to convert (degrees)

    Returns
    Type Description
    double

    Returns the angle in radians

    | Edit this page View Source

    Distance(MPoint, MPoint)

    Declaration
    public static double Distance(MPoint a, MPoint b)
    Parameters
    Type Name Description
    MPoint a
    MPoint b
    Returns
    Type Description
    double
    | Edit this page View Source

    Distance(double, double, double, double)

    Gets the euclidean distance between two points.

    Declaration
    public static double Distance(double x1, double y1, double x2, double y2)
    Parameters
    Type Name Description
    double x1

    The first point's X coordinate.

    double y1

    The first point's Y coordinate.

    double x2

    The second point's X coordinate.

    double y2

    The second point's Y coordinate.

    Returns
    Type Description
    double
    | Edit this page View Source

    DistancePointLine(MPoint, MPoint, MPoint)

    Computes the distance from a point p to a line segment AB. Note: NON-ROBUST!

    Declaration
    public static double DistancePointLine(MPoint p, MPoint a, MPoint b)
    Parameters
    Type Name Description
    MPoint p

    The point to compute the distance for.

    MPoint a

    One point of the line.

    MPoint b

    Another point of the line (must be different to A).

    Returns
    Type Description
    double

    The distance from p to line segment AB.

    | Edit this page View Source

    RadiansToDegrees(double)

    Declaration
    public static double RadiansToDegrees(double radians)
    Parameters
    Type Name Description
    double radians
    Returns
    Type Description
    double
    | Edit this page View Source

    RotateClockwiseDegrees(double, double, double)

    Rotates the specified point clockwise about the origin

    Declaration
    public static MPoint RotateClockwiseDegrees(double x, double y, double degrees)
    Parameters
    Type Name Description
    double x

    X coordinate to rotate

    double y

    Y coordinate to rotate

    double degrees

    Angle to rotate (degrees)

    Returns
    Type Description
    MPoint

    Returns the rotated point

    | Edit this page View Source

    RotateClockwiseRadians(double, double, double)

    Rotates the specified point clockwise about the origin

    Declaration
    public static MPoint RotateClockwiseRadians(double x, double y, double radians)
    Parameters
    Type Name Description
    double x

    X coordinate to rotate

    double y

    Y coordinate to rotate

    double radians

    Angle to rotate (radians)

    Returns
    Type Description
    MPoint

    Returns the rotated point

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX