Click or drag to resize
Vector2d Structure
Represents the two components of a vector in two-dimensional space, using Double-precision floating point numbers.

Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.1.50000.0 (5.0.20693.0)
Syntax
[SerializableAttribute]
public struct Vector2d : ISerializable, IEquatable<Vector2d>, 
	IComparable<Vector2d>, IComparable, IEpsilonComparable<Vector2d>

The Vector2d type exposes the following members.

Constructors
  NameDescription
Public methodVector2d
Initializes a new instance of the vector based on two, X and Y, components.
Top
Properties
  NameDescription
Public propertyIsValid
Gets a value indicating whether this vector is valid. A valid vector must be formed of valid component values for x, y and z.
Public propertyLength
Computes the length (or magnitude, or size) of this vector. This is an application of Pythagoras' theorem.
Public propertyStatic memberUnset
Gets the value of the vector with components set as RhinoMath.UnsetValue,RhinoMath.UnsetValue.
Public propertyX
Gets or sets the X (first) component of this vector.
Public propertyY
Gets or sets the Y (second) component of this vector.
Public propertyStatic memberZero
Gets the value of the vector with components 0,0.
Top
Methods
  NameDescription
Public methodCompareTo
Compares this Vector2d with another Vector2d.

Components evaluation priority is first X, then Y.

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 Vector2d and has the same value as the present vector.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Vector2d)
Determines whether the specified vector has the same value as the present vector.
Public methodGetHashCode
Provides a hashing value for the present vector.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Constructs a string representation of the current vector.
(Overrides ValueTypeToString.)
Public methodUnitize
Unitizes the vector in place. A unit vector has length 1 unit.

An invalid or zero length vector cannot be unitized.

Top
Operators
  NameDescription
Public operatorStatic memberEquality
Determines whether two vectors have equal values.
Public operatorStatic memberGreaterThan
Determines whether the first specified vector comes after (has superior sorting value than) the second vector.

Components have decreasing evaluation priority: first X, then Y.

Public operatorStatic memberGreaterThanOrEqual
Determines whether the first specified vector comes after (has superior sorting value than) the second vector, or it is equal to it.

Components have decreasing evaluation priority: first X, then Y.

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

Components have decreasing evaluation priority: first X, then Y.

Public operatorStatic memberLessThanOrEqual
Determines whether the first specified vector comes before (has inferior sorting value than) the second vector, or it is equal to it.

Components have decreasing evaluation priority: first X, then Y.

Top
See Also