# VectorExtensionMethods class

Namespace: [Grasshopper2.Extensions](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.extensions.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public static class VectorExtensionMethods
```

Extension methods for Eto.Drawing.SizeF, Vector2d and Vector3d.

## Methods

- [Angle](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/angle.md): (2 overloads, static) Compute the clockwise and anti-clockwise angles between two vectors.
- [Average](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/average.md): (2 overloads, static) Compute the average of a collection of points.
- [ClosestParameter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/closestparameter.md): (static) Gets the parameter on a semi-finite ray which best approximates a 3D point.
- [CompareTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/compareto.md): (static) Comparison of two planes.
- [CreatePerpendicular](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/createperpendicular.md): (2 overloads, static) Create a vector perpendicular to the input vector using custom primary and secondary axes. The length of the perpendicular vector will be identical to the length of the secondary axis, not the input vector.
- [DistanceTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/distanceto.md): (static) Gets the smallest distance from a semi-finite ray to a 3D point.
- [FindMagnitude](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/findmagnitude.md): (static) Attempt to find a field scalar value along a finite line segment using binary-like searching.
- [Flip](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/flip.md): (2 overloads, static) Flip a vector if the flipped direction better aligns with a guide vector.
- [IntersectWithLine](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/intersectwithline.md): (static) Intersect a plane with a finite line segment.
- [IsSize](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/issize.md): (2 overloads, static) Test whether a matrix has a specific size.
- [LineSpan](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/linespan.md): (4 overloads, static) Get the domain on a line segment which perpendicularly spans an entire box.
- [PointAt](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/pointat.md): (2 overloads, static) Evaluate the plane at a given coordinate.
- [ProjectUV](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/projectuv.md): (static) Rewrite a point in world coordinates in two-dimensional uv coordinates.
- [ProjectUVW](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/projectuvw.md): (static) Rewrite a point in world coordinates in two-dimensional uv coordinates.
- [Slerp](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/slerp.md): (static) Perform slerp interpolation on two vectors.
- [To2d](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/to2d.md): (2 overloads, static) Convert a SizeF into a Point2d.
- [To3d](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/to3d.md): (4 overloads, static) Convert a [Point3f](https://mcneel-apidocs-rhinocommon-7f6eb10c6967.herokuapp.com/api/rhinocommon/type/rhino.geometry.point3f/) into a [Point3d](https://mcneel-apidocs-rhinocommon-7f6eb10c6967.herokuapp.com/api/rhinocommon/type/rhino.geometry.point3d/).
- [To3f](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/to3f.md): (static) Convert a Vector3d into a Vector2d.
- [ToComplex](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/tocomplex.md): (static) Convert a column or row matrix with two cells into a complex number.
- [ToMathNetMatrix](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/tomathnetmatrix.md): (static) Convert a RhinoCommon matrix into a MathNet matrix.
- [ToPoint3d](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/topoint3d.md): (static) Convert a column or row matrix with three cells into a point.
- [ToRhinoCommonMatrix](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/torhinocommonmatrix.md): (static) Convert a MathNet matrix into a RhinoCommon matrix.
- [ToSize](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/tosize.md): (static) Convert a SizeF into a Size.
- [ToSizeF](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/tosizef.md): (2 overloads, static) Convert a Vector2d to a SizeF.
- [ToTransform](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/totransform.md): (static) Convert a 3×3, or 4×3, or 4×4 matrix into a transformation.
- [ToVector3d](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/tovector3d.md): (static) Convert a column or row matrix with three cells into a vector.
- [TransformDirection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.vectorextensionmethods/transformdirection.md): (static) Transform a vector spatially. This is needed when transforming vectors using shear or taper matrices. This method differs from the standard Vector3d.Transform method in that it retains perpendicularity through taper and shear deformations. This method does not guarantee that the magnitude of the result is anywhere near correct, it is only concerned with the direction.
