Class Point2d
Last update: 09.03.2026Namespace: OpenTD
Assembly: OpenTD.dll
A mathematical point in 2D.
[MessagePackObject(true)]
public class Point2d
Inheritance
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Point2d()
Initializes a new instance of the
public Point2d()
Point2d(Point2d)
Copy constructor.
public Point2d(Point2d p)
Parameters
p Point2d
The Point2d to copy from.
Point2d(double, double)
Initializes a new instance of the
public Point2d(double x, double y)
Parameters
x double
The x value.
y double
The y value.
Properties
X
public Dimensional<ModelLength> X { get; set; }
Property Value
Y
public Dimensional<ModelLength> Y { get; set; }
Property Value
Methods
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
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
A hash code for the current object.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
A string that represents the current object.
Operators
operator +(Point2d, Point2d)
public static Point2d operator +(Point2d firstOperand, Point2d secondOperand)
Parameters
firstOperand Point2d
secondOperand Point2d
Returns
operator +(Point2d, Vector3d)
public static Point2d operator +(Point2d firstOperand, Vector3d secondOperand)
Parameters
firstOperand Point2d
secondOperand Vector3d
Returns
operator ==(Point2d, Point2d)
public static bool operator ==(Point2d first, Point2d second)
Parameters
first Point2d
second Point2d
Returns
operator !=(Point2d, Point2d)
public static bool operator !=(Point2d first, Point2d second)
Parameters
first Point2d
second Point2d
Returns
operator -(Point2d, Point2d)
public static Vector3d operator -(Point2d a, Point2d b)
Parameters
a Point2d
b Point2d