Table of Contents

Class Point2D

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

Coordinate in 2D space with floating point values

public class Point2D : IComparable<Point2D>, IEquatable<Point2D>
Inheritance
Point2D
Implements
Inherited Members
Extension Methods

Constructors

Point2D()

public Point2D()

Point2D(double, double)

public Point2D(double x, double y)

Parameters

x double
y double

Fields

Origin

public static readonly Point2D Origin

Field Value

Point2D

Properties

X

Position on X axis

public double X { get; set; }

Property Value

double

Y

Position on Y axis

public double Y { get; set; }

Property Value

double

Methods

CompareTo(Point2D)

IComparable interface implementation

public int CompareTo(Point2D other)

Parameters

other Point2D

Point to compare

Returns

int

Compare result

Equals(Point2D)

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

public bool Equals(Point2D other)

Parameters

other Point2D

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 Round()

Returns

Point2

ToString()

Gets a human-readable string representing this Point2D object.

public override string ToString()

Returns

string

String representation