Search Results for

    Show / Hide Table of Contents

    Struct Quadrant

    Quadrant values

    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: NetTopologySuite.Geometries
    Assembly: NetTopologySuite.dll
    Syntax
    public readonly struct Quadrant
    Remarks

    The quadants are numbered as follows:

    1 - NW | 0 - NE 
    -------+------- 
    2 - SW | 3 - SE

    Constructors

    | Edit this page View Source

    Quadrant(Coordinate, Coordinate)

    Returns the quadrant of a directed line segment from p0 to p1.

    Declaration
    public Quadrant(Coordinate p0, Coordinate p1)
    Parameters
    Type Name Description
    Coordinate p0
    Coordinate p1
    Exceptions
    Type Condition
    ArgumentException

    if the points are equal

    | Edit this page View Source

    Quadrant(double, double)

    Creates a quadrant of a directed line segment (specified as x and y displacements, which cannot both be 0).

    Declaration
    public Quadrant(double dx, double dy)
    Parameters
    Type Name Description
    double dx
    double dy
    Exceptions
    Type Condition
    ArgumentException

    If the displacements are both 0

    | Edit this page View Source

    Quadrant(int)

    Creates a quadrant with t

    Declaration
    public Quadrant(int value)
    Parameters
    Type Name Description
    int value

    Properties

    | Edit this page View Source

    IsNorthern

    Returns true if the given quadrant is 0 or 1.

    Declaration
    public bool IsNorthern { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    NE

    North-East

    Declaration
    public static Quadrant NE { get; }
    Property Value
    Type Description
    Quadrant
    | Edit this page View Source

    NW

    North-West

    Declaration
    public static Quadrant NW { get; }
    Property Value
    Type Description
    Quadrant
    | Edit this page View Source

    SE

    South-East

    Declaration
    public static Quadrant SE { get; }
    Property Value
    Type Description
    Quadrant
    | Edit this page View Source

    SW

    South-West

    Declaration
    public static Quadrant SW { get; }
    Property Value
    Type Description
    Quadrant
    | Edit this page View Source

    Undefined

    Undefined

    Declaration
    public static Quadrant Undefined { get; }
    Property Value
    Type Description
    Quadrant

    Methods

    | Edit this page View Source

    CommonHalfPlane(Quadrant, Quadrant)

    Returns the right-hand quadrant of the halfplane defined by the two quadrants, or -1 if the quadrants are opposite, or the quadrant if they are identical.

    Declaration
    public static Quadrant CommonHalfPlane(Quadrant quad1, Quadrant quad2)
    Parameters
    Type Name Description
    Quadrant quad1
    Quadrant quad2
    Returns
    Type Description
    Quadrant
    | Edit this page View Source

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    ValueType.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    ValueType.GetHashCode()
    | Edit this page View Source

    IsInHalfPlane(Quadrant)

    Returns whether this quadrant lies within the given halfplane (specified by its right-hand quadrant).

    Declaration
    public bool IsInHalfPlane(Quadrant halfPlane)
    Parameters
    Type Name Description
    Quadrant halfPlane
    Returns
    Type Description
    bool
    | Edit this page View Source

    IsOpposite(Quadrant)

    Returns true if the quadrants are 1 and 3, or 2 and 4.

    Declaration
    public bool IsOpposite(Quadrant quad)
    Parameters
    Type Name Description
    Quadrant quad

    A quadrant

    Returns
    Type Description
    bool
    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    ValueType.ToString()

    Operators

    | Edit this page View Source

    operator ==(Quadrant, Quadrant)

    Equality operator for quadrants

    Declaration
    public static bool operator ==(Quadrant lhs, Quadrant rhs)
    Parameters
    Type Name Description
    Quadrant lhs

    Quadrant value on the left-hand-side

    Quadrant rhs

    Quadrant value on the right-hand-side

    Returns
    Type Description
    bool

    true if quadrant value of lhs and rhs are equal.

    | Edit this page View Source

    operator >(Quadrant, Quadrant)

    Greater than (>) operator for quadrants

    Declaration
    public static bool operator >(Quadrant lhs, Quadrant rhs)
    Parameters
    Type Name Description
    Quadrant lhs

    Quadrant value on the left-hand-side

    Quadrant rhs

    Quadrant value on the right-hand-side

    Returns
    Type Description
    bool

    true if quadrant value of lhs and rhs are not equal.

    | Edit this page View Source

    operator !=(Quadrant, Quadrant)

    Inequality operator for quadrants

    Declaration
    public static bool operator !=(Quadrant lhs, Quadrant rhs)
    Parameters
    Type Name Description
    Quadrant lhs

    Quadrant value on the left-hand-side

    Quadrant rhs

    Quadrant value on the right-hand-side

    Returns
    Type Description
    bool

    true if quadrant value of lhs and rhs are not equal.

    | Edit this page View Source

    operator <(Quadrant, Quadrant)

    Less than (<) operator for quadrants

    Declaration
    public static bool operator <(Quadrant lhs, Quadrant rhs)
    Parameters
    Type Name Description
    Quadrant lhs

    Quadrant value on the left-hand-side

    Quadrant rhs

    Quadrant value on the right-hand-side

    Returns
    Type Description
    bool

    true if quadrant value of lhs and rhs are not equal.

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