﻿Point2f Structure

# Point2f Structure

Represents the two coordinates of a point in two-dimensional space, using Single-precision floating point numbers.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
```[SerializableAttribute]
public struct Point2f : IEquatable<Point2f>,
IComparable<Point2f>, IComparable, IEpsilonFComparable<Point2f>,
IFormattable```

The Point2f type exposes the following members.

Constructors
NameDescription
Point2f(Double, Double)
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.

Point2f(Single, Single)
Initializes a new two-dimensional point from two components.
Top
Properties
NameDescription
IsValid
Gets a value indicating whether this point is considered valid.
Item
Accesses the coordinates of this point.
Unset
Gets the standard unset point.
X
Gets or sets the X (first) component of the vector.
Y
Gets or sets the Y (second) component of the vector.
Top
Methods
NameDescription
CompareTo
Compares this Point2f with another Point2f.

Coordinates evaluation priority is first X, then Y.

DistanceTo
Computes the distance between two points.
DistanceToSquared
Computes the squared distance between two points.
EpsilonEquals
Check that all values in other are within epsilon of the values in this
Equals(Object)
Determines whether the specified System.Object is a Point2f and has the same values as the present point.
(Overrides ValueTypeEquals(Object).)
Equals(Point2f)
Determines whether the specified Point2f has the same values as the present point.
GetHashCode
Computes a hash number that represents the current point.
(Overrides ValueTypeGetHashCode.)
GetType
Gets the Type of the current instance.
(Inherited from Object.)
ToString
Constructs the string representation for the current point.
(Overrides ValueTypeToString.)
ToString(String, IFormatProvider)
Formats the value of the current instance using the specified format.
Top
Operators
NameDescription
Sums two Point2fs.
Division
Divides a Point2f by a scalar.
Equality
Determines whether two Point2f have equal values.
(Point2d to Point2f)
Converts a double-precision point in a single-precision point. Needs explicit casting to help retain precision.
GreaterThan
Determines whether the first specified Point2f comes after (has superior sorting value than) the second point.

Coordinates evaluation priority is first X, then Y.

GreaterThanOrEqual
Determines whether the first specified Point2f comes after (has superior sorting value than) the second point, or it is equal to it.

Coordinates evaluation priority is first X, then Y.

Inequality
Determines whether two Point2f have different values.
LessThan
Determines whether the first specified Point2f comes before (has inferior sorting value than) the second point.

Coordinates evaluation priority is first X, then Y.

LessThanOrEqual
Determines whether the first specified Point2f comes before (has inferior sorting value than) the second point, or it is equal to it.

Coordinates evaluation priority is first X, then Y.

Multiply
Multiplies a Point2f by a scalar.
Subtraction
Subtracts two Point2fs.
Top