Show / Hide Table of Contents

Struct Point

Represents an x and y coordinate pair in 2D space.

Implements
System.IEquatable<Point>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: GraphShape
Assembly: GraphShape.dll
Syntax
[Serializable]
public struct Point : IEquatable<Point>

Constructors

| Improve this Doc View Source

Point(Double, Double)

Constructor.

Declaration
public Point(double x, double y)
Parameters
Type Name Description
System.Double x

X value.

System.Double y

Y value.

Properties

| Improve this Doc View Source

X

X.

Declaration
public double X { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Y

Y.

Declaration
public double Y { get; set; }
Property Value
Type Description
System.Double

Methods

| Improve this Doc View Source

Equals(Point)

Declaration
public bool Equals(Point other)
Parameters
Type Name Description
Point other
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Equals(Point, Point)

Compares the two specified Points for equality.

Declaration
public static bool Equals(Point point1, Point point2)
Parameters
Type Name Description
Point point1

The first Point to compare.

Point point2

The second Point to compare.

Returns
Type Description
System.Boolean

True if both Point are equal, otherwise false.

| Improve this Doc View Source

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.ValueType.Equals(System.Object)
| Improve this Doc View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.ValueType.GetHashCode()
| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.ValueType.ToString()

Operators

| Improve this Doc View Source

Addition(Point, Vector)

Translates the specified Point by the specified Vector and returns the result.

Declaration
public static Point operator +(Point point, Vector vector)
Parameters
Type Name Description
Point point

The point to translate.

Vector vector

The amount by which to translate point.

Returns
Type Description
Point

The result of translating the specified point by the specified vector.

| Improve this Doc View Source

Equality(Point, Point)

Indicates whether both Point are equal.

Declaration
public static bool operator ==(Point point1, Point point2)
Parameters
Type Name Description
Point point1

First Point to compare.

Point point2

Second Point to compare.

Returns
Type Description
System.Boolean

True if both Point are equal, otherwise false.

| Improve this Doc View Source

Inequality(Point, Point)

Indicates whether both Point are not equal.

Declaration
public static bool operator !=(Point point1, Point point2)
Parameters
Type Name Description
Point point1

First Point to compare.

Point point2

Second Point to compare.

Returns
Type Description
System.Boolean

True if both Point are equal, otherwise false.

| Improve this Doc View Source

Subtraction(Point, Point)

Subtracts the specified Point from another specified Point and returns the difference as a Vector.

Declaration
public static Vector operator -(Point point1, Point point2)
Parameters
Type Name Description
Point point1

The point from which point2 is subtracted.

Point point2

The point to subtract from point1.

Returns
Type Description
Vector

The difference between point1 and point2.

| Improve this Doc View Source

Subtraction(Point, Vector)

Subtracts the specified Vector from the specified Point and returns the resulting Point.

Declaration
public static Point operator -(Point point, Vector vector)
Parameters
Type Name Description
Point point

The point from which vector is subtracted.

Vector vector

The vector to subtract from point.

Returns
Type Description
Point

The difference between point and vector.

Implements

System.IEquatable<T>

Extension Methods

GraphHelpers.GetDistances<TVertex, TEdge, TGraph>(TGraph)
GraphHelpers.GetDiameter<TVertex, TEdge, TGraph>(TGraph)
GraphHelpers.GetDiameter<TVertex, TEdge, TGraph>(TGraph, out Double[,])
  • Improve this Doc
  • View Source
In This Article
Back to top GraphShape