Represents a single immutable n-dimensional point.

Constructors

PointN

#
Create a new multi-dimensional point.
public PointN(
coordinates
Coordinates.
)

PointN

#
Create a new multi-dimensional point.
public PointN(
params double[]
coordinates
Coordinates.
)

Properties

Description

#
Gets a description of this object type.
public string Description { get; }
Description

Dimensionality

#
Gets the dimensionality of this object instance.
public int Dimensionality { get; }
Dimensionality

IsInfinite

#
Gets whether this point is infinite. If the coordinates contain even a single Infinity value, the point is considered to be at infinity. This test is fast.
public bool IsInfinite { get; }

IsLarge

#
Gets whether this point contains any coordinates that are considered large enough to be problematic for arithmetical operations. Infinities are not counted as big numbers. This test is fast.
public bool IsLarge { get; }

IsNegative

#
Gets whether this point contains any negative coordinates. Zero is not counted as a negative number. This test is fast.
public bool IsNegative { get; }

IsOrigin

#
Gets whether this point represents the origin. All coordinates must be exactly equal to zero for a point to be considered the origin. This test is fast.
public bool IsOrigin { get; }

IsPositive

#
Gets whether this point contains any positive coordinates. Zero is not counted as a positive number. This test is fast.
public bool IsPositive { get; }

IsUnit

#
Gets whether this point resides on or near the unit hypersphere. This test is fast.
public bool IsUnit { get; }

IsUnset

#
Gets whether this point is unset. If the coordinates contain even a single NaN value, the point is considered to be unset. This test is fast.
public bool IsUnset { get; }

IsZero

#
Gets whether this point contains any coordinates that are exactly zero. This test is fast.
public bool IsZero { get; }

Indexers

this[]

#
Gets the component of this point for the given axis.
public double this[
dimension
] { get; }

Methods

CompareTo

#
Compare two PointNs for sort order.
public int CompareTo(
other
)

CreateInfinite

#
Create a new point of a specific dimensionality at infinity.
public static PointN CreateInfinite(
dimensionality,
Dimensionality of point.
positive
If true, point will reside at positive infinity.
)
Infinity point.

CreateOrigin

#
Create a new origin point of a specific dimensionality.
public static PointN CreateOrigin(
dimensionality
Dimensionality of point.
)
Origin point.

CreateUnset

#
Create a new unset point of a specific dimensionality.
public static PointN CreateUnset(
dimensionality
Dimensionality of point.
)
None point.

Distance

#
Compute the distance between two points.
public double Distance(
other
Second point.
)
Distance.

Equals

#
Indicates whether this instance and a specified object are equal.
public override bool Equals(
obj
The object to compare with the current instance.
)
true if obj and this instance are the same type and represent the same value; otherwise, false.
ValueType.Equals

Equals

#
Compare two PointNs for equality.
public bool Equals(
other
)

GetHashCode

#
Returns the hash code for this instance.
public override int GetHashCode()
A 32-bit signed integer that is the hash code for this instance.

Quadrance

#
Compute the quadrance between two points.
public double Quadrance(
other
Second point.
)
Quadrance.

ToArray

#
Convert the coordinates to a double array.
public double[] ToArray()

ToString

#
Returns the fully qualified type name of this instance.
public override string ToString()

Operators

OperationResultDescription
PointN+PointNPointNAdd two multi-dimensional points together.
PointN/doublePointNDivide a point by a factor.
PointN*doublePointNMultiply a point by a factor.
PointN-PointNPointNSubtract two multi-dimensional points. If the points do not share their dimensionality, the results will be meaningless and exceptions may be thrown.