Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Struct: RT.Util.Geometry.PointD

Summary

Encapsulates a double-precision point.

Constructors

PointD(double x, double y)
Initialises a double-precision point with the specified co-ordinates.
PointD(double angle)
Initialises a double-precision point as a unit vector at a specified angle (in radians).
PointD(PointF pointF)
Converts the provided PointF to a PointD.

Instance methods

double
Abs()
Returns the length of the vector represented by this PointD.
double
CrossZ(PointD other)
Returns the Z-component of the cross product of this vector with the other one. The Z-component is equal to the product of: the lengths of the two vectors and the sin of the angle between them. Note that the X and Y components of a cross product of 2-vectors are always zero.
void
DecomposeAlong(PointD vector, out double lenAlong, out double lenNormal)
Decomposes this vector into components relative to another vector.
void
Deconstruct(out double x, out double y)
Deconstructs this point into a tuple.
doubleCalculates the distance between this point and the origin.
doubleCalculates the distance between this point and other.
double
Dot(PointD other)
Returns the dot product of this vector with the specified one.
bool
Equals(object obj)
  • Overrides: object.Equals(object)
Compares two PointD objects for equality.
bool
Equals(PointD other)
int
  • Overrides: object.GetHashCode()
Returns a hash code for the current PointD.
doubleReturns the length of this vector's projection onto the specified vector.
double
LengthProjectedOnto(double angle)
Returns the length of this vector's projection onto a unit vector at the specified angle.
PointDReturns a vector normal to this one.
PointD Returns a vector representing the projection (i.e. length and direction) of this vector onto the specified vector.
void
RecomposeAlong(PointD vector, double lenAlong, double lenNormal)
Performs the inverse of PointD.DecomposeAlong(PointD, out double, out double), modifying the current vector in place.
PointD
Rotated(double angle)
Returns a vector of the same length as this vector, but rotated by the specified angle.
doubleReturns the theta (angle) of the vector represented by this PointD.
PointF Converts the current PointD object to a PointF. Note that doing so loses precision.
string
  • Overrides: object.ToString()
Provides a string representation of the current PointD.
PointDReturns the unit vector in the same direction as this one.

Operators

PointD
operator+(PointD one, PointD other)
Performs vector addition, returning the result.
PointD
operator/(PointD vector, double scalar)
Scales a vector by 1 / scalar (i.e. performs scalar division).
bool Compares two PointD objects for equality.
bool Compares two PointD objects for inequality.
PointD
operator*(double scalar, PointD vector)
Scales a vector by a scalar.
PointD
operator*(PointD vector, double scalar)
PointD
operator-(PointD left, PointD right)
Performs vector subtraction, returning the result.
PointD Performs unary vector negation (i.e. the resulting point is of the same length but pointing in the opposite direction).

Instance fields

doubleX-co-ordinate of the point.
doubleY-co-ordinate of the point.