[]
Represents a four dimensional mathematical vector.
[TypeConverter(typeof(Vector4Converter))]
public struct Vector4 : IEquatable<Vector4>, IFormattable
Name | Description |
---|---|
Vector4(Vector2, float, float) | Initializes a new instance of the Vector4 struct. |
Vector4(Vector3, float) | Initializes a new instance of the Vector4 struct. |
Vector4(float) | Initializes a new instance of the Vector4 struct. |
Vector4(float, float, float, float) | Initializes a new instance of the Vector4 struct. |
Vector4(float[]) | Initializes a new instance of the Vector4 struct. |
Name | Description |
---|---|
One | A Vector4 with all of its components set to one. |
SizeInBytes | The size of the Vector4 type, in bytes. |
UnitW | The W unit Vector4 (0, 0, 0, 1). |
UnitX | The X unit Vector4 (1, 0, 0, 0). |
UnitY | The Y unit Vector4 (0, 1, 0, 0). |
UnitZ | The Z unit Vector4 (0, 0, 1, 0). |
W | The W component of the vector. |
X | The X component of the vector. |
Y | The Y component of the vector. |
Z | The Z component of the vector. |
Zero | A Vector4 with all of its components set to zero. |
Name | Description |
---|---|
IsNormalized | Gets a value indicting whether this instance is normalized. |
this[int] | Gets or sets the component at the specified index. |
Length | Gets the length of the vector. |
LengthSquared | Gets the squared length of the vector. |
Name | Description |
---|---|
Abs(Vector4) | Returns a vector whose elements are the absolute values of each of the specified vector's elements. |
AbsRef(ref Vector4) | Calculates the absolute value vector. |
AbsRef(out Vector4, ref Vector4) | Returns a vector whose elements are the absolute values of each of the specified vector's elements. |
Add(Vector4, Vector4) | Adds two vectors. |
AddRef(out Vector4, ref Vector4, ref Vector4) | Adds two vectors. |
Clamp(Vector4, Vector4, Vector4) | Restricts a vector between a minimum and a maximum value. |
ClampRef(out Vector4, ref Vector4, ref Vector4, ref Vector4) | Restricts a vector between a minimum and a maximum value. |
Divide(Vector4, Vector4) | Divides the first vector by the second. |
Divide(Vector4, float) | Divides the specified vector by a specified scalar value. |
DivideRef(out Vector4, ref Vector4, ref Vector4) | Divides the first vector by the second. |
DivideRef(out Vector4, ref Vector4, float) | Divides the specified vector by a specified scalar value. |
Dot(Vector4, Vector4) | Calculates the dot product of two vectors. |
DotRef(ref Vector4, ref Vector4) | Calculates the dot product of two vectors. |
Equals(Vector4) | Determines whether the specified Vector4 is equal to this instance. |
Equals(object) | Determines whether the specified object is equal to this instance. |
EqualsRef(ref Vector4) | Determines whether the specified Vector4 is equal to this instance. |
GetHashCode() | Returns a hash code for this instance. |
Lerp(Vector4, Vector4, float) | Performs a linear interpolation between two vectors based on the given weighting. |
LerpRef(out Vector4, ref Vector4, ref Vector4, float) | Performs a linear interpolation between two vectors based on the given weighting. |
Max(Vector4, Vector4) | Returns a vector containing the largest components of the specified vectors. |
MaxRef(out Vector4, ref Vector4, ref Vector4) | Returns a vector containing the largest components of the specified vectors. |
Min(Vector4, Vector4) | Returns a vector containing the smallest components of the specified vectors. |
MinRef(out Vector4, ref Vector4, ref Vector4) | Returns a vector containing the smallest components of the specified vectors. |
Multiply(Vector4, Vector4) | Modulates a vector with another by performing component-wise multiplication. |
Multiply(Vector4, float) | Scales a vector by the given value. |
MultiplyRef(out Vector4, ref Vector4, ref Vector4) | Modulates a vector with another by performing component-wise multiplication. |
MultiplyRef(out Vector4, ref Vector4, float) | Scales a vector by the given value. |
Negate(Vector4) | Reverses the direction of a given vector. |
NegateRef(ref Vector4) | Reverses the direction of the vector. |
NegateRef(out Vector4, ref Vector4) | Reverses the direction of a given vector. |
Normalize(Vector4) | Converts the vector into a unit vector. |
NormalizeRef(ref Vector4) | Converts the vector into a unit vector. |
NormalizeRef(out Vector4, ref Vector4) | Converts the vector into a unit vector. |
Subtract(Vector4, Vector4) | Subtracts two vectors. |
SubtractRef(out Vector4, ref Vector4, ref Vector4) | Subtracts two vectors. |
ToArray() | Creates an array containing the elements of the vector. |
ToString() | Returns a string that represents this instance. |
ToString(IFormatProvider) | Returns a string that represents this instance. |
ToString(string) | Returns a string that represents this instance. |
ToString(string, IFormatProvider) | Returns a string that represents this instance. |
Name | Description |
---|---|
operator +(Vector4, Vector4) | Adds two vectors. |
operator /(Vector4, Vector4) | Divides the first vector by the second. |
operator /(Vector4, float) | Divides the specified vector by a specified scalar value. |
operator ==(Vector4, Vector4) | Tests for equality between two objects. |
explicit operator Vector2(Vector4) | |
explicit operator Vector3(Vector4) | |
operator !=(Vector4, Vector4) | Tests for inequality between two objects. |
operator *(Vector4, Vector4) | Modulates a vector with another by performing component-wise multiplication. |
operator *(Vector4, float) | Scales a vector by the given value. |
operator *(float, Vector4) | Scales a vector by the given value. |
operator -(Vector4, Vector4) | Subtracts two vectors. |
operator -(Vector4) | Reverses the direction of a given vector. |