Table of Contents

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

x int

The x.

y int

The y.

Fields

X

Left coordinate.

[DataMember(0)]
public int X

Field Value

int

Y

Top coordinate.

[DataMember(1)]
public int Y

Field Value

int

Zero

A point with (0,0) coordinates.

public static readonly Point Zero

Field Value

Point

Methods

Deconstruct(out int, out int)

Deconstructs the vector's components into named variables.

public void Deconstruct(out int x, out int y)

Parameters

x int

The X component

y int

The Y component

Equals(Point)

Determines whether the specified object is equal to this instance.

public bool Equals(Point other)

Parameters

other Point

The object to compare with this instance.

Returns

bool

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

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The 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

left Point

The left.

right Point

The right.

Returns

bool

The result of the operator.

explicit operator Point(Vector2)

Performs an implicit conversion from Vector2 to Point.

public static explicit operator Point(Vector2 value)

Parameters

value Vector2

The value.

Returns

Point

The result of the conversion.

implicit operator Vector2(Point)

Performs an explicit conversion from Point to Vector2.

public static implicit operator Vector2(Point value)

Parameters

value Point

The value.

Returns

Vector2

The result of the conversion.

operator !=(Point, Point)

Implements the operator !=.

public static bool operator !=(Point left, Point right)

Parameters

left Point

The left.

right Point

The right.

Returns

bool

The result of the operator.