# Vector3 Struct

## Definition

Represents a 3D vector using three single-precision floating-point numbers.

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

## Remarks

The Vector3 structure is suitable for interoperation with unmanaged code requiring three consecutive floats.

## Constructors

 Constructs a new Vector3. Constructs a new Vector3 from the given Vector2. Constructs a new Vector3 from the given Vector3. Constructs a new Vector3 from the given Vector4.

## Fields

 Defines an instance with all components set to 1. Defines the size of the Vector3 struct in bytes. Defines a unit-length Vector3 that points towards the X-axis. Defines a unit-length Vector3 that points towards the Y-axis. /// Defines a unit-length Vector3 that points towards the Z-axis. The X component of the Vector3. The Y component of the Vector3. The Z component of the Vector3. Defines a zero-length Vector3.

## Properties

 Gets the length (magnitude) of the vector. Gets an approximation of the vector length (magnitude). Gets the square of the vector length (magnitude). Gets or sets an OpenTK.Vector2 with the X and Y components of this instance.

## Methods

 Obsolete. Add the Vector passed as parameter to this instance. Obsolete. Add the Vector passed as parameter to this instance. Add two Vectors Calculates the angle (in radians) between two vectors. Clamp a vector to the given minimum and maximum vectors Calculate the component-wise maximum of two vectors Calculate the component-wise minimum of two vectors Caclulate the cross (vector) product of two vectors Obsolete. Divide this instance by a scalar. Calculate the dot (scalar) product of two vectors Indicates whether this instance and a specified object are equal. Indicates whether the current vector is equal to another vector. Returns the hashcode for this instance. Obsolete. Multiply this instance by a scalar. Scales the Vector3 to unit length. Scale a vector to unit length Scales the Vector3 to approximately unit length. Scale a vector to approximately unit length Obsolete. Scales the current Vector3 by the given amounts. Obsolete. Scales this instance by the given parameter. Obsolete. Scales this instance by the given parameter. Obsolete. Subtract the Vector passed as parameter from this instance. Obsolete. Subtract the Vector passed as parameter from this instance. Obsolete. Subtract one Vector from another Returns a System.String that represents the current Vector3. Transform a Vector by the given Matrix Transform a Normal by the given Matrix Transform a Normal by the (transpose of the) given Matrix Transform a Vector3 by the given Matrix, and project the resulting Vector4 back to a Vector3 Transform a Position by the given Matrix Transform a direction vector by the given Matrix Assumes the matrix has a bottom row of (0,0,0,1), that is the translation part is ignored.