Struct Coordinates
- Namespace
- ScottPlot
- Assembly
- ScottPlot.dll
Represents a point in coordinate space (X and Y axis units)
public struct Coordinates : IEquatable<Coordinates>
- Implements
- Inherited Members
- Extension Methods
Constructors
Coordinates(double, double)
Define a new coordinate at the given X and Y location (in axis units)
public Coordinates(double x, double y)
Parameters
Properties
AreReal
public bool AreReal { get; }
Property Value
Infinity
public static Coordinates Infinity { get; }
Property Value
NaN
public static Coordinates NaN { get; }
Property Value
Origin
public static Coordinates Origin { get; }
Property Value
Rotated
The inverse of the present coordinate. E.g., the point (X, Y) becomes (Y, X).
public readonly Coordinates Rotated { get; }
Property Value
X
public double X { readonly get; set; }
Property Value
Y
public double Y { readonly get; set; }
Property Value
Zero
public static Coordinates Zero { get; }
Property Value
Methods
Deconstruct()
public readonly (double X, double Y) Deconstruct()
Returns
Distance(Coordinates)
public double Distance(Coordinates pt)
Parameters
pt
Coordinates
Returns
DistanceSquared(Coordinates)
public double DistanceSquared(Coordinates pt)
Parameters
pt
Coordinates
Returns
Equals(Coordinates)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Coordinates other)
Parameters
other
CoordinatesAn object to compare with this object.
Returns
- bool
true if the current object is equal to the
other
parameter; otherwise, false.
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToRect(double)
public CoordinateRect ToRect(double radius)
Parameters
radius
double
Returns
ToRect(double, double)
public CoordinateRect ToRect(double radiusX, double radiusY)
Parameters
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
WithDelta(double, double)
public Coordinates WithDelta(double dX, double dY)
Parameters
Returns
Zip(double[], double[])
Create an array of coordinates from individual arrays of X and Y positions
public static Coordinates[] Zip(double[] xs, double[] ys)
Parameters
Returns
Operators
operator +(Coordinates, Coordinates)
public static Coordinates operator +(Coordinates a, Coordinates b)
Parameters
Returns
operator ==(Coordinates, Coordinates)
public static bool operator ==(Coordinates a, Coordinates b)
Parameters
Returns
operator !=(Coordinates, Coordinates)
public static bool operator !=(Coordinates a, Coordinates b)