# Vector2Vector2 Struct

## Definition

Represents a 2D vector using two single-precision floating-point numbers.

``````[System.Serializable]
public struct Vector2 : IEquatable<OpenTK.Vector2>``````
``type Vector2 = struct``
Inheritance
Vector2Vector2
Attributes
Implements

## Remarks

The Vector2 structure is suitable for interoperation with unmanaged code requiring two consecutive floats.

## Constructors

 Vector2(Vector2) Vector2(Vector2) Constructs a new Vector2 from the given Vector2. Vector2(Vector3) Vector2(Vector3) Constructs a new Vector2 from the given Vector3. Vector2(Vector4) Vector2(Vector4) Constructs a new Vector2 from the given Vector4. Vector2(Single) Vector2(Single) Vector2(Single, Single) Vector2(Single, Single) Constructs a new Vector2.

## Fields

 One One Defines an instance with all components set to 1. SizeInBytes SizeInBytes Defines the size of the Vector2 struct in bytes. UnitX UnitX Defines a unit-length Vector2 that points towards the X-axis. UnitY UnitY Defines a unit-length Vector2 that points towards the Y-axis. X X The X component of the Vector2. Y Y The Y component of the Vector2. Zero Zero Defines a zero-length Vector2.

## Properties

 Length Length Gets the length (magnitude) of the vector. LengthFast LengthFast Gets an approximation of the vector length (magnitude). LengthSquared LengthSquared Gets the square of the vector length (magnitude). PerpendicularLeft PerpendicularLeft Gets the perpendicular vector on the left side of this vector. PerpendicularRight PerpendicularRight Gets the perpendicular vector on the right side of this vector.