Table of Contents

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

x double
y double

Properties

AreReal

public bool AreReal { get; }

Property Value

bool

Infinity

public static Coordinates Infinity { get; }

Property Value

Coordinates

NaN

public static Coordinates NaN { get; }

Property Value

Coordinates

Origin

public static Coordinates Origin { get; }

Property Value

Coordinates

Rotated

The inverse of the present coordinate. E.g., the point (X, Y) becomes (Y, X).

public readonly Coordinates Rotated { get; }

Property Value

Coordinates

X

public double X { readonly get; set; }

Property Value

double

Y

public double Y { readonly get; set; }

Property Value

double

Zero

public static Coordinates Zero { get; }

Property Value

Coordinates

Methods

Deconstruct()

public readonly (double X, double Y) Deconstruct()

Returns

(double X, double Y)

Distance(Coordinates)

public double Distance(Coordinates pt)

Parameters

pt Coordinates

Returns

double

DistanceSquared(Coordinates)

public double DistanceSquared(Coordinates pt)

Parameters

pt Coordinates

Returns

double

Equals(Coordinates)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Coordinates other)

Parameters

other Coordinates

An 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 object

The 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

CoordinateRect

ToRect(double, double)

public CoordinateRect ToRect(double radiusX, double radiusY)

Parameters

radiusX double
radiusY double

Returns

CoordinateRect

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

dX double
dY double

Returns

Coordinates

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

xs double[]
ys double[]

Returns

Coordinates[]

Operators

operator +(Coordinates, Coordinates)

public static Coordinates operator +(Coordinates a, Coordinates b)

Parameters

a Coordinates
b Coordinates

Returns

Coordinates

operator ==(Coordinates, Coordinates)

public static bool operator ==(Coordinates a, Coordinates b)

Parameters

a Coordinates
b Coordinates

Returns

bool

operator !=(Coordinates, Coordinates)

public static bool operator !=(Coordinates a, Coordinates b)

Parameters

a Coordinates
b Coordinates

Returns

bool