Struct Point
Represents an x and y coordinate pair in 2D space.
Implements
Inherited Members
Namespace: GraphShape
Assembly: GraphShape.dll
Syntax
[Serializable]
public struct Point : IEquatable<Point>
Constructors
| Improve this Doc View SourcePoint(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 SourceX
X.
Declaration
public double X { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Y
Y.
Declaration
public double Y { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
| Improve this Doc View SourceEquals(Point)
Declaration
public bool Equals(Point other)
Parameters
Type | Name | Description |
---|---|---|
Point | other |
Returns
Type | Description |
---|---|
System.Boolean |
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. |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
Operators
| Improve this Doc View SourceAddition(Point, Vector)
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 |
Returns
Type | Description |
---|---|
Point | The result of translating the specified point by the specified vector. |
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. |
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. |
Subtraction(Point, Point)
Declaration
public static Vector operator -(Point point1, Point point2)
Parameters
Type | Name | Description |
---|---|---|
Point | point1 | The point from which |
Point | point2 | The point to subtract from |
Returns
Type | Description |
---|---|
Vector | The difference between |
Subtraction(Point, Vector)
Declaration
public static Point operator -(Point point, Vector vector)
Parameters
Type | Name | Description |
---|---|---|
Point | point | The point from which |
Vector | vector | The vector to subtract from |
Returns
Type | Description |
---|---|
Point | The difference between |