Struct Point
- Namespace
- Stride.Core.Mathematics
- Assembly
- Stride.Core.Mathematics.dll
A 2D point.
[DataContract]
public struct Point : IEquatable<Point>
- Implements
Constructors
Point(int, int)
Initializes a new instance of the Point struct.
public Point(int x, int y)
Parameters
Fields
X
Left coordinate.
[DataMember(0)]
public int X
Field Value
Y
Top coordinate.
[DataMember(1)]
public int Y
Field Value
Zero
A point with (0,0) coordinates.
public static readonly Point Zero
Field Value
Methods
Deconstruct(out int, out int)
Deconstructs the vector's components into named variables.
public void Deconstruct(out int x, out int y)
Parameters
Equals(Point)
Determines whether the specified object is equal to this instance.
public bool Equals(Point other)
Parameters
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
obj
objectThe 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.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(Point, Point)
Implements the operator ==.
public static bool operator ==(Point left, Point right)
Parameters
Returns
- bool
The result of the operator.
explicit operator Point(Vector2)
public static explicit operator Point(Vector2 value)
Parameters
value
Vector2The value.
Returns
- Point
The result of the conversion.
implicit operator Vector2(Point)
public static implicit operator Vector2(Point value)
Parameters
value
PointThe value.
Returns
- Vector2
The result of the conversion.
operator !=(Point, Point)
Implements the operator !=.
public static bool operator !=(Point left, Point right)
Parameters
Returns
- bool
The result of the operator.