Struct Vector4
Describes a 4D-vector.
[TypeConverter(typeof(Vector4TypeConverter))]
[DataContract]
public struct Vector4 : IEquatable<Vector4>
- Implements
- Inherited Members
Constructors
Vector4(Vector2, float, float)
Constructs a 3d vector with X and Z from Vector2 and Z and W from the scalars.
public Vector4(Vector2 value, float z, float w)
Parameters
valueVector2The x and y coordinates in 4d-space.
zfloatThe z coordinate in 4d-space.
wfloatThe w coordinate in 4d-space.
Vector4(Vector3, float)
Constructs a 3d vector with X, Y, Z from Vector3 and W from a scalar.
public Vector4(Vector3 value, float w)
Parameters
Vector4(float)
Constructs a 4d vector with X, Y, Z and W set to the same value.
public Vector4(float value)
Parameters
valuefloatThe x, y, z and w coordinates in 4d-space.
Vector4(float, float, float, float)
Constructs a 3d vector with X, Y, Z and W from four values.
public Vector4(float x, float y, float z, float w)
Parameters
xfloatThe x coordinate in 4d-space.
yfloatThe y coordinate in 4d-space.
zfloatThe z coordinate in 4d-space.
wfloatThe w coordinate in 4d-space.
Fields
W
The w coordinate of this Vector4.
[DataMember]
public float W
Field Value
X
The x coordinate of this Vector4.
[DataMember]
public float X
Field Value
Y
The y coordinate of this Vector4.
[DataMember]
public float Y
Field Value
Z
The z coordinate of this Vector4.
[DataMember]
public float Z
Field Value
Properties
One
Returns a Vector4 with components 1, 1, 1, 1.
public static Vector4 One { get; }
Property Value
UnitW
Returns a Vector4 with components 0, 0, 0, 1.
public static Vector4 UnitW { get; }
Property Value
UnitX
Returns a Vector4 with components 1, 0, 0, 0.
public static Vector4 UnitX { get; }
Property Value
UnitY
Returns a Vector4 with components 0, 1, 0, 0.
public static Vector4 UnitY { get; }
Property Value
UnitZ
Returns a Vector4 with components 0, 0, 1, 0.
public static Vector4 UnitZ { get; }
Property Value
Zero
Returns a Vector4 with components 0, 0, 0, 0.
public static Vector4 Zero { get; }
Property Value
Methods
Add(Vector4, Vector4)
Performs vector addition on value1 and value2.
public static Vector4 Add(Vector4 value1, Vector4 value2)
Parameters
Returns
- Vector4
The result of the vector addition.
Add(ref Vector4, ref Vector4, out Vector4)
Performs vector addition on value1 and
value2, storing the result of the
addition in result.
public static void Add(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
Parameters
value1Vector4The first vector to add.
value2Vector4The second vector to add.
resultVector4The result of the vector addition.
Barycentric(Vector4, Vector4, Vector4, float, float)
Creates a new Vector4 that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 4d-triangle.
public static Vector4 Barycentric(Vector4 value1, Vector4 value2, Vector4 value3, float amount1, float amount2)
Parameters
value1Vector4The first vector of 4d-triangle.
value2Vector4The second vector of 4d-triangle.
value3Vector4The third vector of 4d-triangle.
amount1floatBarycentric scalar
b2which represents a weighting factor towards second vector of 4d-triangle.amount2floatBarycentric scalar
b3which represents a weighting factor towards third vector of 4d-triangle.
Returns
- Vector4
The cartesian translation of barycentric coordinates.
Barycentric(ref Vector4, ref Vector4, ref Vector4, float, float, out Vector4)
Creates a new Vector4 that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 4d-triangle.
public static void Barycentric(ref Vector4 value1, ref Vector4 value2, ref Vector4 value3, float amount1, float amount2, out Vector4 result)
Parameters
value1Vector4The first vector of 4d-triangle.
value2Vector4The second vector of 4d-triangle.
value3Vector4The third vector of 4d-triangle.
amount1floatBarycentric scalar
b2which represents a weighting factor towards second vector of 4d-triangle.amount2floatBarycentric scalar
b3which represents a weighting factor towards third vector of 4d-triangle.resultVector4The cartesian translation of barycentric coordinates as an output parameter.
CatmullRom(Vector4, Vector4, Vector4, Vector4, float)
Creates a new Vector4 that contains CatmullRom interpolation of the specified vectors.
public static Vector4 CatmullRom(Vector4 value1, Vector4 value2, Vector4 value3, Vector4 value4, float amount)
Parameters
value1Vector4The first vector in interpolation.
value2Vector4The second vector in interpolation.
value3Vector4The third vector in interpolation.
value4Vector4The fourth vector in interpolation.
amountfloatWeighting factor.
Returns
- Vector4
The result of CatmullRom interpolation.
CatmullRom(ref Vector4, ref Vector4, ref Vector4, ref Vector4, float, out Vector4)
Creates a new Vector4 that contains CatmullRom interpolation of the specified vectors.
public static void CatmullRom(ref Vector4 value1, ref Vector4 value2, ref Vector4 value3, ref Vector4 value4, float amount, out Vector4 result)
Parameters
value1Vector4The first vector in interpolation.
value2Vector4The second vector in interpolation.
value3Vector4The third vector in interpolation.
value4Vector4The fourth vector in interpolation.
amountfloatWeighting factor.
resultVector4The result of CatmullRom interpolation as an output parameter.
Ceiling()
Round the members of this Vector4 towards positive infinity.
public void Ceiling()
Ceiling(Vector4)
Creates a new Vector4 that contains members from another vector rounded towards positive infinity.
public static Vector4 Ceiling(Vector4 value)
Parameters
Returns
Ceiling(ref Vector4, out Vector4)
Creates a new Vector4 that contains members from another vector rounded towards positive infinity.
public static void Ceiling(ref Vector4 value, out Vector4 result)
Parameters
Clamp(Vector4, Vector4, Vector4)
Clamps the specified value within a range.
public static Vector4 Clamp(Vector4 value1, Vector4 min, Vector4 max)
Parameters
Returns
- Vector4
The clamped value.
Clamp(ref Vector4, ref Vector4, ref Vector4, out Vector4)
Clamps the specified value within a range.
public static void Clamp(ref Vector4 value1, ref Vector4 min, ref Vector4 max, out Vector4 result)
Parameters
value1Vector4The value to clamp.
minVector4The min value.
maxVector4The max value.
resultVector4The clamped value as an output parameter.
Deconstruct(out float, out float, out float, out float)
Deconstruction method for Vector4.
public void Deconstruct(out float x, out float y, out float z, out float w)
Parameters
Distance(Vector4, Vector4)
Returns the distance between two vectors.
public static float Distance(Vector4 value1, Vector4 value2)
Parameters
Returns
- float
The distance between two vectors.
Distance(ref Vector4, ref Vector4, out float)
Returns the distance between two vectors.
public static void Distance(ref Vector4 value1, ref Vector4 value2, out float result)
Parameters
value1Vector4The first vector.
value2Vector4The second vector.
resultfloatThe distance between two vectors as an output parameter.
DistanceSquared(Vector4, Vector4)
Returns the squared distance between two vectors.
public static float DistanceSquared(Vector4 value1, Vector4 value2)
Parameters
Returns
- float
The squared distance between two vectors.
DistanceSquared(ref Vector4, ref Vector4, out float)
Returns the squared distance between two vectors.
public static void DistanceSquared(ref Vector4 value1, ref Vector4 value2, out float result)
Parameters
value1Vector4The first vector.
value2Vector4The second vector.
resultfloatThe squared distance between two vectors as an output parameter.
Divide(Vector4, Vector4)
public static Vector4 Divide(Vector4 value1, Vector4 value2)
Parameters
Returns
- Vector4
The result of dividing the vectors.
Divide(Vector4, float)
Divides the components of a Vector4 by a scalar.
public static Vector4 Divide(Vector4 value1, float divider)
Parameters
Returns
- Vector4
The result of dividing a vector by a scalar.
Divide(ref Vector4, ref Vector4, out Vector4)
public static void Divide(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
Parameters
value1Vector4Source Vector4.
value2Vector4Divisor Vector4.
resultVector4The result of dividing the vectors as an output parameter.
Divide(ref Vector4, float, out Vector4)
Divides the components of a Vector4 by a scalar.
public static void Divide(ref Vector4 value1, float divider, out Vector4 result)
Parameters
value1Vector4Source Vector4.
dividerfloatDivisor scalar.
resultVector4The result of dividing a vector by a scalar as an output parameter.
Dot(Vector4, Vector4)
Returns a dot product of two vectors.
public static float Dot(Vector4 value1, Vector4 value2)
Parameters
Returns
- float
The dot product of two vectors.
Dot(ref Vector4, ref Vector4, out float)
Returns a dot product of two vectors.
public static void Dot(ref Vector4 value1, ref Vector4 value2, out float result)
Parameters
value1Vector4The first vector.
value2Vector4The second vector.
resultfloatThe dot product of two vectors as an output parameter.
Equals(Vector4)
Compares whether current instance is equal to specified Vector4.
public bool Equals(Vector4 other)
Parameters
Returns
- bool
trueif the instances are equal;falseotherwise.
Equals(object)
Compares whether current instance is equal to specified object.
public override bool Equals(object obj)
Parameters
Returns
- bool
trueif the instances are equal;falseotherwise.
Floor()
Round the members of this Vector4 towards negative infinity.
public void Floor()
Floor(Vector4)
Creates a new Vector4 that contains members from another vector rounded towards negative infinity.
public static Vector4 Floor(Vector4 value)
Parameters
Returns
Floor(ref Vector4, out Vector4)
Creates a new Vector4 that contains members from another vector rounded towards negative infinity.
public static void Floor(ref Vector4 value, out Vector4 result)
Parameters
GetHashCode()
Gets the hash code of this Vector4.
public override int GetHashCode()
Returns
Hermite(Vector4, Vector4, Vector4, Vector4, float)
Creates a new Vector4 that contains hermite spline interpolation.
public static Vector4 Hermite(Vector4 value1, Vector4 tangent1, Vector4 value2, Vector4 tangent2, float amount)
Parameters
value1Vector4The first position vector.
tangent1Vector4The first tangent vector.
value2Vector4The second position vector.
tangent2Vector4The second tangent vector.
amountfloatWeighting factor.
Returns
- Vector4
The hermite spline interpolation vector.
Hermite(ref Vector4, ref Vector4, ref Vector4, ref Vector4, float, out Vector4)
Creates a new Vector4 that contains hermite spline interpolation.
public static void Hermite(ref Vector4 value1, ref Vector4 tangent1, ref Vector4 value2, ref Vector4 tangent2, float amount, out Vector4 result)
Parameters
value1Vector4The first position vector.
tangent1Vector4The first tangent vector.
value2Vector4The second position vector.
tangent2Vector4The second tangent vector.
amountfloatWeighting factor.
resultVector4The hermite spline interpolation vector as an output parameter.
Length()
Returns the length of this Vector4.
public float Length()
Returns
LengthSquared()
Returns the squared length of this Vector4.
public float LengthSquared()
Returns
Lerp(Vector4, Vector4, float)
Creates a new Vector4 that contains linear interpolation of the specified vectors.
public static Vector4 Lerp(Vector4 value1, Vector4 value2, float amount)
Parameters
value1Vector4The first vector.
value2Vector4The second vector.
amountfloatWeighting value(between 0.0 and 1.0).
Returns
- Vector4
The result of linear interpolation of the specified vectors.
Lerp(ref Vector4, ref Vector4, float, out Vector4)
Creates a new Vector4 that contains linear interpolation of the specified vectors.
public static void Lerp(ref Vector4 value1, ref Vector4 value2, float amount, out Vector4 result)
Parameters
value1Vector4The first vector.
value2Vector4The second vector.
amountfloatWeighting value(between 0.0 and 1.0).
resultVector4The result of linear interpolation of the specified vectors as an output parameter.
LerpPrecise(Vector4, Vector4, float)
Creates a new Vector4 that contains linear interpolation of the specified vectors. Uses LerpPrecise(float, float, float) on MathHelper for the interpolation. Less efficient but more precise compared to Lerp(Vector4, Vector4, float). See remarks section of LerpPrecise(float, float, float) on MathHelper for more info.
public static Vector4 LerpPrecise(Vector4 value1, Vector4 value2, float amount)
Parameters
value1Vector4The first vector.
value2Vector4The second vector.
amountfloatWeighting value(between 0.0 and 1.0).
Returns
- Vector4
The result of linear interpolation of the specified vectors.
LerpPrecise(ref Vector4, ref Vector4, float, out Vector4)
Creates a new Vector4 that contains linear interpolation of the specified vectors. Uses LerpPrecise(float, float, float) on MathHelper for the interpolation. Less efficient but more precise compared to Lerp(ref Vector4, ref Vector4, float, out Vector4). See remarks section of LerpPrecise(float, float, float) on MathHelper for more info.
public static void LerpPrecise(ref Vector4 value1, ref Vector4 value2, float amount, out Vector4 result)
Parameters
value1Vector4The first vector.
value2Vector4The second vector.
amountfloatWeighting value(between 0.0 and 1.0).
resultVector4The result of linear interpolation of the specified vectors as an output parameter.
Max(Vector4, Vector4)
Creates a new Vector4 that contains a maximal values from the two vectors.
public static Vector4 Max(Vector4 value1, Vector4 value2)
Parameters
Returns
Max(ref Vector4, ref Vector4, out Vector4)
Creates a new Vector4 that contains a maximal values from the two vectors.
public static void Max(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
Parameters
value1Vector4The first vector.
value2Vector4The second vector.
resultVector4The Vector4 with maximal values from the two vectors as an output parameter.
Min(Vector4, Vector4)
Creates a new Vector4 that contains a minimal values from the two vectors.
public static Vector4 Min(Vector4 value1, Vector4 value2)
Parameters
Returns
Min(ref Vector4, ref Vector4, out Vector4)
Creates a new Vector4 that contains a minimal values from the two vectors.
public static void Min(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
Parameters
value1Vector4The first vector.
value2Vector4The second vector.
resultVector4The Vector4 with minimal values from the two vectors as an output parameter.
Multiply(Vector4, Vector4)
Creates a new Vector4 that contains a multiplication of two vectors.
public static Vector4 Multiply(Vector4 value1, Vector4 value2)
Parameters
Returns
- Vector4
The result of the vector multiplication.
Multiply(Vector4, float)
public static Vector4 Multiply(Vector4 value1, float scaleFactor)
Parameters
Returns
- Vector4
The result of the vector multiplication with a scalar.
Multiply(ref Vector4, ref Vector4, out Vector4)
Creates a new Vector4 that contains a multiplication of two vectors.
public static void Multiply(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
Parameters
value1Vector4Source Vector4.
value2Vector4Source Vector4.
resultVector4The result of the vector multiplication as an output parameter.
Multiply(ref Vector4, float, out Vector4)
public static void Multiply(ref Vector4 value1, float scaleFactor, out Vector4 result)
Parameters
value1Vector4Source Vector4.
scaleFactorfloatScalar value.
resultVector4The result of the multiplication with a scalar as an output parameter.
Negate(Vector4)
Creates a new Vector4 that contains the specified vector inversion.
public static Vector4 Negate(Vector4 value)
Parameters
Returns
- Vector4
The result of the vector inversion.
Negate(ref Vector4, out Vector4)
Creates a new Vector4 that contains the specified vector inversion.
public static void Negate(ref Vector4 value, out Vector4 result)
Parameters
valueVector4Source Vector4.
resultVector4The result of the vector inversion as an output parameter.
Normalize()
Turns this Vector4 to a unit vector with the same direction.
public void Normalize()
Normalize(Vector4)
Creates a new Vector4 that contains a normalized values from another vector.
public static Vector4 Normalize(Vector4 value)
Parameters
Returns
- Vector4
Unit vector.
Normalize(ref Vector4, out Vector4)
Creates a new Vector4 that contains a normalized values from another vector.
public static void Normalize(ref Vector4 value, out Vector4 result)
Parameters
Round()
Round the members of this Vector4 to the nearest integer value.
public void Round()
Round(Vector4)
Creates a new Vector4 that contains members from another vector rounded to the nearest integer value.
public static Vector4 Round(Vector4 value)
Parameters
Returns
Round(ref Vector4, out Vector4)
Creates a new Vector4 that contains members from another vector rounded to the nearest integer value.
public static void Round(ref Vector4 value, out Vector4 result)
Parameters
SmoothStep(Vector4, Vector4, float)
Creates a new Vector4 that contains cubic interpolation of the specified vectors.
public static Vector4 SmoothStep(Vector4 value1, Vector4 value2, float amount)
Parameters
Returns
- Vector4
Cubic interpolation of the specified vectors.
SmoothStep(ref Vector4, ref Vector4, float, out Vector4)
Creates a new Vector4 that contains cubic interpolation of the specified vectors.
public static void SmoothStep(ref Vector4 value1, ref Vector4 value2, float amount, out Vector4 result)
Parameters
value1Vector4Source Vector4.
value2Vector4Source Vector4.
amountfloatWeighting value.
resultVector4Cubic interpolation of the specified vectors as an output parameter.
Subtract(Vector4, Vector4)
public static Vector4 Subtract(Vector4 value1, Vector4 value2)
Parameters
Returns
- Vector4
The result of the vector subtraction.
Subtract(ref Vector4, ref Vector4, out Vector4)
public static void Subtract(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
Parameters
value1Vector4Source Vector4.
value2Vector4Source Vector4.
resultVector4The result of the vector subtraction as an output parameter.
ToNumerics()
Returns a Vector4.
public Vector4 ToNumerics()
Returns
ToString()
public override string ToString()
Returns
Transform(Vector2, Matrix)
public static Vector4 Transform(Vector2 value, Matrix matrix)
Parameters
Returns
Transform(Vector2, Quaternion)
Creates a new Vector4 that contains a transformation of 2d-vector by the specified Quaternion.
public static Vector4 Transform(Vector2 value, Quaternion rotation)
Parameters
valueVector2Source Vector2.
rotationQuaternionThe Quaternion which contains rotation transformation.
Returns
Transform(ref Vector2, ref Matrix, out Vector4)
public static void Transform(ref Vector2 value, ref Matrix matrix, out Vector4 result)
Parameters
valueVector2Source Vector2.
matrixMatrixThe transformation Matrix.
resultVector4Transformed Vector4 as an output parameter.
Transform(ref Vector2, ref Quaternion, out Vector4)
Creates a new Vector4 that contains a transformation of 2d-vector by the specified Quaternion.
public static void Transform(ref Vector2 value, ref Quaternion rotation, out Vector4 result)
Parameters
valueVector2Source Vector2.
rotationQuaternionThe Quaternion which contains rotation transformation.
resultVector4Transformed Vector4 as an output parameter.
Transform(Vector3, Matrix)
public static Vector4 Transform(Vector3 value, Matrix matrix)
Parameters
Returns
Transform(Vector3, Quaternion)
Creates a new Vector4 that contains a transformation of 3d-vector by the specified Quaternion.
public static Vector4 Transform(Vector3 value, Quaternion rotation)
Parameters
valueVector3Source Vector3.
rotationQuaternionThe Quaternion which contains rotation transformation.
Returns
Transform(ref Vector3, ref Matrix, out Vector4)
public static void Transform(ref Vector3 value, ref Matrix matrix, out Vector4 result)
Parameters
valueVector3Source Vector3.
matrixMatrixThe transformation Matrix.
resultVector4Transformed Vector4 as an output parameter.
Transform(ref Vector3, ref Quaternion, out Vector4)
Creates a new Vector4 that contains a transformation of 3d-vector by the specified Quaternion.
public static void Transform(ref Vector3 value, ref Quaternion rotation, out Vector4 result)
Parameters
valueVector3Source Vector3.
rotationQuaternionThe Quaternion which contains rotation transformation.
resultVector4Transformed Vector4 as an output parameter.
Transform(Vector4, Matrix)
public static Vector4 Transform(Vector4 value, Matrix matrix)
Parameters
Returns
Transform(Vector4, Quaternion)
Creates a new Vector4 that contains a transformation of 4d-vector by the specified Quaternion.
public static Vector4 Transform(Vector4 value, Quaternion rotation)
Parameters
valueVector4Source Vector4.
rotationQuaternionThe Quaternion which contains rotation transformation.
Returns
Transform(ref Vector4, ref Matrix, out Vector4)
public static void Transform(ref Vector4 value, ref Matrix matrix, out Vector4 result)
Parameters
valueVector4Source Vector4.
matrixMatrixThe transformation Matrix.
resultVector4Transformed Vector4 as an output parameter.
Transform(ref Vector4, ref Quaternion, out Vector4)
Creates a new Vector4 that contains a transformation of 4d-vector by the specified Quaternion.
public static void Transform(ref Vector4 value, ref Quaternion rotation, out Vector4 result)
Parameters
valueVector4Source Vector4.
rotationQuaternionThe Quaternion which contains rotation transformation.
resultVector4Transformed Vector4 as an output parameter.
Transform(Vector4[], ref Matrix, Vector4[])
Apply transformation on all vectors within array of Vector4 by the specified Matrix and places the results in an another array.
public static void Transform(Vector4[] sourceArray, ref Matrix matrix, Vector4[] destinationArray)
Parameters
sourceArrayVector4[]Source array.
matrixMatrixThe transformation Matrix.
destinationArrayVector4[]Destination array.
Transform(Vector4[], ref Quaternion, Vector4[])
Apply transformation on all vectors within array of Vector4 by the specified Quaternion and places the results in an another array.
public static void Transform(Vector4[] sourceArray, ref Quaternion rotation, Vector4[] destinationArray)
Parameters
sourceArrayVector4[]Source array.
rotationQuaternionThe Quaternion which contains rotation transformation.
destinationArrayVector4[]Destination array.
Transform(Vector4[], int, ref Matrix, Vector4[], int, int)
Apply transformation on vectors within array of Vector4 by the specified Matrix and places the results in an another array.
public static void Transform(Vector4[] sourceArray, int sourceIndex, ref Matrix matrix, Vector4[] destinationArray, int destinationIndex, int length)
Parameters
sourceArrayVector4[]Source array.
sourceIndexintThe starting index of transformation in the source array.
matrixMatrixThe transformation Matrix.
destinationArrayVector4[]Destination array.
destinationIndexintThe starting index in the destination array, where the first Vector4 should be written.
lengthintThe number of vectors to be transformed.
Transform(Vector4[], int, ref Quaternion, Vector4[], int, int)
Apply transformation on vectors within array of Vector4 by the specified Quaternion and places the results in an another array.
public static void Transform(Vector4[] sourceArray, int sourceIndex, ref Quaternion rotation, Vector4[] destinationArray, int destinationIndex, int length)
Parameters
sourceArrayVector4[]Source array.
sourceIndexintThe starting index of transformation in the source array.
rotationQuaternionThe Quaternion which contains rotation transformation.
destinationArrayVector4[]Destination array.
destinationIndexintThe starting index in the destination array, where the first Vector4 should be written.
lengthintThe number of vectors to be transformed.
Operators
operator +(Vector4, Vector4)
Adds two vectors.
public static Vector4 operator +(Vector4 value1, Vector4 value2)
Parameters
value1Vector4Source Vector4 on the left of the add sign.
value2Vector4Source Vector4 on the right of the add sign.
Returns
- Vector4
Sum of the vectors.
operator /(Vector4, Vector4)
public static Vector4 operator /(Vector4 value1, Vector4 value2)
Parameters
value1Vector4Source Vector4 on the left of the div sign.
value2Vector4Divisor Vector4 on the right of the div sign.
Returns
- Vector4
The result of dividing the vectors.
operator /(Vector4, float)
Divides the components of a Vector4 by a scalar.
public static Vector4 operator /(Vector4 value1, float divider)
Parameters
value1Vector4Source Vector4 on the left of the div sign.
dividerfloatDivisor scalar on the right of the div sign.
Returns
- Vector4
The result of dividing a vector by a scalar.
operator ==(Vector4, Vector4)
Compares whether two Vector4 instances are equal.
public static bool operator ==(Vector4 value1, Vector4 value2)
Parameters
value1Vector4Vector4 instance on the left of the equal sign.
value2Vector4Vector4 instance on the right of the equal sign.
Returns
- bool
trueif the instances are equal;falseotherwise.
implicit operator Vector4(Vector4)
public static implicit operator Vector4(Vector4 value)
Parameters
valueVector4The converted value.
Returns
operator !=(Vector4, Vector4)
Compares whether two Vector4 instances are not equal.
public static bool operator !=(Vector4 value1, Vector4 value2)
Parameters
value1Vector4Vector4 instance on the left of the not equal sign.
value2Vector4Vector4 instance on the right of the not equal sign.
Returns
- bool
trueif the instances are not equal;falseotherwise.
operator *(Vector4, Vector4)
Multiplies the components of two vectors by each other.
public static Vector4 operator *(Vector4 value1, Vector4 value2)
Parameters
value1Vector4Source Vector4 on the left of the mul sign.
value2Vector4Source Vector4 on the right of the mul sign.
Returns
- Vector4
Result of the vector multiplication.
operator *(Vector4, float)
Multiplies the components of vector by a scalar.
public static Vector4 operator *(Vector4 value, float scaleFactor)
Parameters
valueVector4Source Vector4 on the left of the mul sign.
scaleFactorfloatScalar value on the right of the mul sign.
Returns
- Vector4
Result of the vector multiplication with a scalar.
operator *(float, Vector4)
Multiplies the components of vector by a scalar.
public static Vector4 operator *(float scaleFactor, Vector4 value)
Parameters
scaleFactorfloatScalar value on the left of the mul sign.
valueVector4Source Vector4 on the right of the mul sign.
Returns
- Vector4
Result of the vector multiplication with a scalar.
operator -(Vector4, Vector4)
public static Vector4 operator -(Vector4 value1, Vector4 value2)
Parameters
value1Vector4Source Vector4 on the left of the sub sign.
value2Vector4Source Vector4 on the right of the sub sign.
Returns
- Vector4
Result of the vector subtraction.
operator -(Vector4)
Inverts values in the specified Vector4.
public static Vector4 operator -(Vector4 value)
Parameters
Returns
- Vector4
Result of the inversion.