Table of Contents

Class Point2<T>

Namespace
FellowOakDicom.Imaging.Mathematics
Assembly
fo-dicom.core.dll

Coordinate in 2D space with floating point values

public sealed class Point2<T> : IComparable<Point2<T>>, IEquatable<Point2<T>> where T : INumber<T>, IFloatingPoint<T>

Type Parameters

T
Inheritance
Point2<T>
Implements
Inherited Members
Extension Methods

Constructors

Point2()

public Point2()

Point2(T, T)

public Point2(T x, T y)

Parameters

x T
y T

Fields

Origin

public static readonly Point2<T> Origin

Field Value

Point2<T>

Properties

X

Position on X axis

public T X { get; set; }

Property Value

T

Y

Position on Y axis

public T Y { get; set; }

Property Value

T

Methods

CompareTo(Point2<T>)

IComparable interface implementation

public int CompareTo(Point2<T> other)

Parameters

other Point2<T>

Point to compare

Returns

int

Compare result

Equals(Point2<T>)

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

public bool Equals(Point2<T> other)

Parameters

other Point2<T>

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Round()

public Point2<T> Round()

Returns

Point2<T>

ToString()

Gets a human-readable string representing this Point2 object.

public override string ToString()

Returns

string

String representation