# SCNVector4SCNVector4 Struct

## Definition

A 4-component vector.

``````[System.Serializable]
public struct SCNVector4 : IEquatable<SceneKit.SCNVector4>``````
``type SCNVector4 = struct``
Inheritance
SCNVector4SCNVector4
Attributes
Implements

## Constructors

 SCNVector4(Vector2) SCNVector4(Vector2) SCNVector4(Vector3) SCNVector4(Vector3) SCNVector4(Vector4) SCNVector4(Vector4) SCNVector4(SCNVector3) SCNVector4(SCNVector3) SCNVector4(SCNVector4) SCNVector4(SCNVector4) SCNVector4(SCNVector3, nfloat) SCNVector4(SCNVector3, nfloat) SCNVector4(SCNVector3, Single) SCNVector4(SCNVector3, Single) SCNVector4(nfloat, nfloat, nfloat, nfloat) SCNVector4(nfloat, nfloat, nfloat, nfloat) SCNVector4(Single, Single, Single, Single) SCNVector4(Single, Single, Single, Single)

## Fields

 One One A vector whose components are each 1. SizeInBytes SizeInBytes The size in bytes of the vector. UnitW UnitW A unit vector along the W axis. UnitX UnitX A unit vector along the W axis. UnitY UnitY A unit vector along the Y axis. UnitZ UnitZ A unit vector along the Z axis.. W W Gets or sets the W component. X X Gets or sets the X component. Y Y Gets or sets the Y component. Z Z Gets or sets the Z component. Zero Zero The Zero vector.

## Properties

 Length Length Gets the length of the vector. LengthFast LengthFast Gets the approximate length of the vector by using an approximation of the square root operation. LengthSquared LengthSquared Gets the sum of the squares of the components of the vector. Xy Xy Gets or sets the X and Y components. Xyz Xyz Gets or sets the X, Y, and Z components.

## Methods

 Add(SCNVector4, SCNVector4) Add(SCNVector4, SCNVector4) Adds `b` to `a`. Add(SCNVector4, SCNVector4, SCNVector4) Add(SCNVector4, SCNVector4, SCNVector4) Adds `b` to `a`, and puts the result in `result`. BaryCentric(SCNVector4, SCNVector4, SCNVector4, Single, Single, SCNVector4) BaryCentric(SCNVector4, SCNVector4, SCNVector4, Single, Single, SCNVector4) Interpolates `a`, `b`, and `c`, by using the barycentric coordinates `u` and `v`, and stores the result in `result`. BaryCentric(SCNVector4, SCNVector4, SCNVector4, nfloat, nfloat, SCNVector4) BaryCentric(SCNVector4, SCNVector4, SCNVector4, nfloat, nfloat, SCNVector4) BaryCentric(SCNVector4, SCNVector4, SCNVector4, nfloat, nfloat) BaryCentric(SCNVector4, SCNVector4, SCNVector4, nfloat, nfloat) BaryCentric(SCNVector4, SCNVector4, SCNVector4, Single, Single) BaryCentric(SCNVector4, SCNVector4, SCNVector4, Single, Single) Interpolates `a`, `b`, and `c`, by using the barycentric coordinates `u` and `v`. Clamp(SCNVector4, SCNVector4, SCNVector4) Clamp(SCNVector4, SCNVector4, SCNVector4) Clamps the components of `vec` to be between `min` and `max`. Clamp(SCNVector4, SCNVector4, SCNVector4, SCNVector4) Clamp(SCNVector4, SCNVector4, SCNVector4, SCNVector4) Clamps the components of `vec` to be between `min` and `max` and stores the result in `result`. Div(SCNVector4, nfloat) Div(SCNVector4, nfloat) Div(SCNVector4, Single) Div(SCNVector4, Single) Divides the components of `a` by the scalar `f`. Div(SCNVector4, nfloat, SCNVector4) Div(SCNVector4, nfloat, SCNVector4) Div(SCNVector4, Single, SCNVector4) Div(SCNVector4, Single, SCNVector4) Divides the components of `a` by the scalar `f` and stores the result in `result`. Divide(SCNVector4, nfloat, SCNVector4) Divide(SCNVector4, nfloat, SCNVector4) Divide(SCNVector4, Single, SCNVector4) Divide(SCNVector4, Single, SCNVector4) Divides the components of `vector` by the scalar `scale` and stores the result in `result`. Divide(SCNVector4, SCNVector4, SCNVector4) Divide(SCNVector4, SCNVector4, SCNVector4) Performs the componentwise division of `vector` by `scale` and stores the result in `result`. Divide(SCNVector4, nfloat) Divide(SCNVector4, nfloat) Divide(SCNVector4, SCNVector4) Divide(SCNVector4, SCNVector4) Returns the componentwise division of `vector` by `scale`. Divide(SCNVector4, Single) Divide(SCNVector4, Single) Divides the components of `vector` by the scalar `scale`. Dot(SCNVector4, SCNVector4) Dot(SCNVector4, SCNVector4) Returns the dot product of `left` with `right`. Dot(SCNVector4, SCNVector4, nfloat) Dot(SCNVector4, SCNVector4, nfloat) Sets `result` to the dot product of `left` with `right`. Dot(SCNVector4, SCNVector4, Single) Dot(SCNVector4, SCNVector4, Single) Sets `result` to the dot product of `left` with `right`. Equals(SCNVector4) Equals(SCNVector4) Returns `true` if `other` is identical to this vector. Equals(Object) Equals(Object) Returns `true` if `other` is a Vector4 and is identical to this vector. GetHashCode() GetHashCode() Returns the hashcode for this instance. Lerp(SCNVector4, SCNVector4, nfloat) Lerp(SCNVector4, SCNVector4, nfloat) Lerp(SCNVector4, SCNVector4, Single) Lerp(SCNVector4, SCNVector4, Single) Returns the linear interpolation from `a` to `b` by the factor `blend`. Lerp(SCNVector4, SCNVector4, nfloat, SCNVector4) Lerp(SCNVector4, SCNVector4, nfloat, SCNVector4) Lerp(SCNVector4, SCNVector4, Single, SCNVector4) Lerp(SCNVector4, SCNVector4, Single, SCNVector4) Returns the linear interpolation from `a` to `b` by the factor `blend`, and stores the result in `result`. Max(SCNVector4, SCNVector4) Max(SCNVector4, SCNVector4) Returns the vector with the larger magnitude. Max(SCNVector4, SCNVector4, SCNVector4) Max(SCNVector4, SCNVector4, SCNVector4) Stores the vector with the larger magnitude in `result`. Min(SCNVector4, SCNVector4, SCNVector4) Min(SCNVector4, SCNVector4, SCNVector4) Stores the vector with the smaller magnitude in `result`. Min(SCNVector4, SCNVector4) Min(SCNVector4, SCNVector4) Returns the vector with the smaller magnitude. Mult(SCNVector4, nfloat, SCNVector4) Mult(SCNVector4, nfloat, SCNVector4) Mult(SCNVector4, Single, SCNVector4) Mult(SCNVector4, Single, SCNVector4) Multiplies `a` by the scalar `f` and stores the result in `result`. Mult(SCNVector4, nfloat) Mult(SCNVector4, nfloat) Mult(SCNVector4, Single) Mult(SCNVector4, Single) Multiplies `a` by the scalar `f`. Multiply(SCNVector4, SCNVector4) Multiply(SCNVector4, SCNVector4) Multiplies the components of `vector` by the components of `scale`. Multiply(SCNVector4, nfloat) Multiply(SCNVector4, nfloat) Multiply(SCNVector4, Single) Multiply(SCNVector4, Single) Multiplies `vector` by the scalar `scale`. Multiply(SCNVector4, SCNVector4, SCNVector4) Multiply(SCNVector4, SCNVector4, SCNVector4) Multiplies the components of `vector` by the components of `scale` and stores the result in `result`. Multiply(SCNVector4, nfloat, SCNVector4) Multiply(SCNVector4, nfloat, SCNVector4) Multiply(SCNVector4, Single, SCNVector4) Multiply(SCNVector4, Single, SCNVector4) Multiplies `vector` by the scalar `scale` and stores the result in `result`. Normalize() Normalize() Scales this vector to unit length. Normalize(SCNVector4) Normalize(SCNVector4) Scales `vec` to unit length. Normalize(SCNVector4, SCNVector4) Normalize(SCNVector4, SCNVector4) Scales `vec` to unit length and stores the result in `result`. NormalizeFast(SCNVector4, SCNVector4) NormalizeFast(SCNVector4, SCNVector4) Scales `vec` to approximately unit length and stores the result in `result`. NormalizeFast() NormalizeFast() Scales this vector to approximately unit length. NormalizeFast(SCNVector4) NormalizeFast(SCNVector4) Scales `vec` to approximately unit length. Sub(SCNVector4, SCNVector4) Sub(SCNVector4, SCNVector4) Subtracts `b` from `a`. Sub(SCNVector4, SCNVector4, SCNVector4) Sub(SCNVector4, SCNVector4, SCNVector4) Subtracts `b` from `a` and stores the result in `result`. Subtract(SCNVector4, SCNVector4) Subtract(SCNVector4, SCNVector4) Subtracts `b` from `a`. Subtract(SCNVector4, SCNVector4, SCNVector4) Subtract(SCNVector4, SCNVector4, SCNVector4) Subtracts `b` from `a` and stores the result in `result`. ToString() ToString() Returns a string representation of this instance. Transform(SCNVector4, SCNMatrix4, SCNVector4) Transform(SCNVector4, SCNMatrix4, SCNVector4) Returns the transformation of `vec` by `mat` and stores the result in `result`. Transform(SCNVector4, SCNMatrix4) Transform(SCNVector4, SCNMatrix4) Returns the transformation of `vec` by `mat`.

## Operators

 Addition(SCNVector4, SCNVector4) Addition(SCNVector4, SCNVector4) Division(SCNVector4, nfloat) Division(SCNVector4, nfloat) Division(SCNVector4, Single) Division(SCNVector4, Single) Equality(SCNVector4, SCNVector4) Equality(SCNVector4, SCNVector4) Explicit(SCNVector4 to Single*) Explicit(SCNVector4 to Single*) Explicit(SCNVector4 to Vector4) Explicit(SCNVector4 to Vector4) Explicit(SCNVector4 to IntPtr) Explicit(SCNVector4 to IntPtr) Explicit(SCNVector4 to nfloat*) Explicit(SCNVector4 to nfloat*) Implicit(Vector4 to SCNVector4) Implicit(Vector4 to SCNVector4) Inequality(SCNVector4, SCNVector4) Inequality(SCNVector4, SCNVector4) Multiply(SCNVector4, nfloat) Multiply(SCNVector4, nfloat) Multiply(SCNVector4, Single) Multiply(SCNVector4, Single) Multiply(nfloat, SCNVector4) Multiply(nfloat, SCNVector4) Multiply(Single, SCNVector4) Multiply(Single, SCNVector4) Subtraction(SCNVector4, SCNVector4) Subtraction(SCNVector4, SCNVector4) UnaryNegation(SCNVector4) UnaryNegation(SCNVector4)