# Point2d struct

Namespace: [Rhino.Geometry](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.geometry.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 16)]
[DebuggerDisplay("({m_x}, {m_y})")]
[Serializable]
public struct Point2d : ISerializable, IEquatable<Point2d>, IComparable<Point2d>, IComparable, IEpsilonComparable<Point2d>, IFormattable
```

Represents the two coordinates of a point in two-dimensional space, using [double](https://learn.microsoft.com/dotnet/api/system.double)-precision floating point numbers.

## Constructors

- [Point2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/ctor.md): (4 overloads) Initializes a new instance of [Point2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d.md) from coordinates.

## Properties

- [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/isvalid.md): If any coordinate of a point is UnsetValue, then the point is not valid.
- [MaximumCoordinate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/maximumcoordinate.md): Gets the largest valid coordinate, or RhinoMath.UnsetValue if no coordinate is valid.
- [MinimumCoordinate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/minimumcoordinate.md): Gets the smallest (both positive and negative) valid coordinate, or RhinoMath.UnsetValue if no coordinate is valid.
- [Origin](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/origin.md): (static) Gets a point at 0,0.
- [Unset](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/unset.md): (static) Gets a point at RhinoMath.UnsetValue,RhinoMath.UnsetValue.
- [X](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/x.md): Gets or sets the X (first) coordinate of the point.
- [Y](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/y.md): Gets or sets the Y (second) coordinate of the point.

## Indexers

- [this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/item.md): Accesses the coordinates of this point.

## Methods

- [Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/add.md): (3 overloads, static) Adds a point with a vector. (Provided for languages that do not support operator overloading. You can use the + operator otherwise)
- [CompareTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/compareto.md): Compares this [Point2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d.md) with another [Point2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d.md). Coordinates evaluation priority is first X, then Y.
- [DistanceTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/distanceto.md): Computes the distance between two points.
- [DistanceToSquared](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/distancetosquared.md): Computes the square of the distance between two 2d points. This method is usually largely faster than DistanceTo().
- [Divide](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/divide.md): (static) Divides a [Point2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d.md) by a number. (Provided for languages that do not support operator overloading. You can use the / operator otherwise)
- [EpsilonEquals](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/epsilonequals.md): Check that all values in other are within epsilon of the values in this
- [Equals](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/equals.md): (2 overloads) Determines whether the specified System.Object is a Point2d and has the same values as the present point.
- [GetHashCode](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/gethashcode.md): Computes a hash number that represents the current point.
- [Multiply](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/multiply.md): (2 overloads, static) Multiplies a [Point2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d.md) by a number. (Provided for languages that do not support operator overloading. You can use the * operator otherwise)
- [Negate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/negate.md): (static) Computes the additive inverse of all coordinates in the point, and returns the new point. (Provided for languages that do not support operator overloading. You can use the - unary operator otherwise)
- [Subtract](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/subtract.md): (2 overloads, static) Subtracts a vector from a point. (Provided for languages that do not support operator overloading. You can use the - operator otherwise)
- [IComparable.CompareTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/system-icomparable-compareto.md)
- [ISerializable.GetObjectData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/system-runtime-serialization-iserializable-getobjectdata.md)
- [ToString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/tostring.md): (2 overloads) Constructs the string representation for the current point.
- [Transform](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/transform.md): Transforms the present point in place. The transformation matrix acts on the left of the point. i.e., result = transformation*point

## Operators

- [operator +](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/op-addition.md): (3 overloads, static) Adds a point with a vector.
- [operator /](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/op-division.md): (static) Divides a [Point2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d.md) by a number.
- [operator ==](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/op-equality.md): (static) Determines whether two [Point2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d.md) have equal values.
- [operator >](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/op-greaterthan.md): (static) Determines whether the first specified [Point2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d.md) comes after (has superior sorting value than) the second point. Coordinates evaluation priority is first X, then Y.
- [operator >=](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/op-greaterthanorequal.md): (static) Determines whether the first specified [Point2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d.md) comes after (has superior sorting value than) the second point, or it is equal to it. Coordinates evaluation priority is first X, then Y.
- [operator !=](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/op-inequality.md): (static) Determines whether two [Point2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d.md) have different values.
- [operator <](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/op-lessthan.md): (static) Determines whether the first specified point comes before (has inferior sorting value than) the second point. Coordinates evaluation priority is first X, then Y.
- [operator <=](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/op-lessthanorequal.md): (static) Determines whether the first specified point comes before (has inferior sorting value than) the second point, or it is equal to it. Coordinates evaluation priority is first X, then Y.
- [operator *](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/op-multiply.md): (2 overloads, static) Multiplies a [Point2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d.md) by a number.
- [operator -](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/op-subtraction.md): (2 overloads, static) Subtracts a vector from a point.
- [operator -](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2d/op-unarynegation.md): (static) Computes the additive inverse of all coordinates in the point, and returns the new point.
