Click or drag to resize

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
Public methodPoint2f(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.

Public methodPoint2f(Single, Single)
Initializes a new two-dimensional point from two components.
Top
Properties
  NameDescription
Public propertyIsValid
Gets a value indicating whether this point is considered valid.
Public propertyItem
Accesses the coordinates of this point.
Public propertyStatic memberUnset
Gets the standard unset point.
Public propertyX
Gets or sets the X (first) component of the vector.
Public propertyY
Gets or sets the Y (second) component of the vector.
Top
Methods
  NameDescription
Public methodStatic memberAdd(Point2f, Vector2f)
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)

Public methodStatic memberAdd(Vector2f, Point2f)
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)

Public methodCompareTo
Compares this Point2f with another Point2f.

Coordinates evaluation priority is first X, then Y.

Public methodDistanceTo
Computes the distance between two points.
Public methodDistanceToSquared
Computes the squared distance between two points.
Public methodStatic memberDivide
Divides a Point2f by a scalar.

(Provided for languages that do not support operator overloading. You can use the / operator otherwise)

Public methodEpsilonEquals
Check that all values in other are within epsilon of the values in this
Public methodEquals(Object)
Determines whether the specified System.Object is a Point2f and has the same values as the present point.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Point2f)
Determines whether the specified Point2f has the same values as the present point.
Public methodGetHashCode
Computes a hash number that represents the current point.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberMultiply(Point2f, Single)
Multiplies a Point2f by a scalar.

(Provided for languages that do not support operator overloading. You can use the * operator otherwise)

Public methodStatic memberMultiply(Single, Point2f)
Multiplies a Point2f by a scalar.

(Provided for languages that do not support operator overloading. You can use the * operator otherwise)

Public methodStatic memberNegate
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)

Public methodStatic memberSubtract(Point2f, Point2f)
Subtracts the second point from the first point.

(Provided for languages that do not support operator overloading. You can use the - operator otherwise)

Public methodStatic memberSubtract(Point2f, Vector2f)
Subtracts a vector from a point.

(Provided for languages that do not support operator overloading. You can use the - operator otherwise)

Public methodToString
Constructs the string representation for the current point.
(Overrides ValueTypeToString.)
Public methodToString(String, IFormatProvider)
Formats the value of the current instance using the specified format.
Top
Operators
  NameDescription
Public operatorStatic memberAddition(Point2f, Point2f)
Sums two Point2fs.
Public operatorStatic memberAddition(Vector2f, Point2f)
Sums up a point and a vector, and returns a new point.
Public operatorStatic memberDivision
Divides a Point2f by a scalar.
Public operatorStatic memberEquality
Determines whether two Point2f have equal values.
Public operatorStatic member(Point2d to Point2f)
Converts a double-precision point in a single-precision point. Needs explicit casting to help retain precision.
Public operatorStatic memberGreaterThan
Determines whether the first specified Point2f comes after (has superior sorting value than) the second point.

Coordinates evaluation priority is first X, then Y.

Public operatorStatic memberGreaterThanOrEqual
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.

Public operatorStatic memberInequality
Determines whether two Point2f have different values.
Public operatorStatic memberLessThan
Determines whether the first specified Point2f comes before (has inferior sorting value than) the second point.

Coordinates evaluation priority is first X, then Y.

Public operatorStatic memberLessThanOrEqual
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.

Public operatorStatic memberMultiply(Point2f, Single)
Multiplies a Point2f by a scalar.
Public operatorStatic memberMultiply(Single, Point2f)
Multiplies a Point2f by a scalar.
Public operatorStatic memberSubtraction(Point2f, Point2f)
Subtracts two Point2fs.
Public operatorStatic memberSubtraction(Point2f, Vector2f)
Subtracts a vector from a point.
Public operatorStatic memberUnaryNegation
Computes the additive inverse of all coordinates in the point, and returns the new point.
Top
See Also