# Point2f 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 = 4, Size = 8)]
[DebuggerDisplay("({m_x}, {m_y})")]
[Serializable]
public struct Point2f : IEquatable<Point2f>, IComparable<Point2f>, IComparable, IEpsilonFComparable<Point2f>, IFormattable
```

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

## Constructors

- [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/ctor.md): (2 overloads) Initializes a new two-dimensional point from two double-precision floating point numbers as coordinates. Coordinates will be internally converted to floating point numbers. This might cause precision loss.

## Properties

- [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/isvalid.md): Gets a value indicating whether this point is considered valid.
- [Unset](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/unset.md): (static) Gets the standard unset point.
- [X](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/x.md): Gets or sets the X (first) component of the vector.
- [Y](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/y.md): Gets or sets the Y (second) component of the vector.

## Indexers

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

## Methods

- [Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/add.md): (2 overloads, static) Sums up a point and a vector, and returns a new point. (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.point2f/compareto.md): Compares this [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f.md) with another [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f.md). Coordinates evaluation priority is first X, then Y.
- [DistanceTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/distanceto.md): Computes the distance between two points.
- [DistanceToSquared](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/distancetosquared.md): Computes the squared distance between two points.
- [Divide](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/divide.md): (static) Divides a [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f.md) by a scalar. (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.point2f/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.point2f/equals.md): (2 overloads) Determines whether the specified System.Object is a [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f.md) and has the same values as the present point.
- [GetHashCode](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/gethashcode.md): Computes a hash number that represents the current point.
- [Multiply](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/multiply.md): (2 overloads, static) Multiplies a [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f.md) by a scalar. (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.point2f/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.point2f/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.point2f/system-icomparable-compareto.md)
- [ToString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/tostring.md): (2 overloads) Constructs the string representation for the current point.

## Operators

- [operator +](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/op-addition.md): (2 overloads, static) Sums up a point and a vector, and returns a new point.
- [operator /](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/op-division.md): (static) Divides a [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f.md) by a scalar.
- [operator ==](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/op-equality.md): (static) Determines whether two [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f.md) have equal values.
- [operator >](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/op-greaterthan.md): (static) Determines whether the first specified [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f.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.point2f/op-greaterthanorequal.md): (static) Determines whether the first specified [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f.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.point2f/op-inequality.md): (static) Determines whether two [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f.md) have different values.
- [operator <](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/op-lessthan.md): (static) Determines whether the first specified [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f.md) 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.point2f/op-lessthanorequal.md): (static) Determines whether the first specified [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f.md) 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.point2f/op-multiply.md): (2 overloads, static) Multiplies a [Point2f](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f.md) by a scalar.
- [operator -](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/op-subtraction.md): (2 overloads, static) Subtracts a vector from a point.
- [operator -](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/op-unarynegation.md): (static) Computes the additive inverse of all coordinates in the point, and returns the new point.

## Convertors

- [operator explicit](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.point2f/op-explicit.md): (static) Converts a double-precision point in a single-precision point. Needs explicit casting to help retain precision.
