Struct Double4
- Namespace
- Stride.Core.Mathematics
- Assembly
- Stride.Core.Mathematics.dll
Represents a four dimensional mathematical vector with double-precision floats.
[DataContract("double4")]
[DataStyle(DataStyle.Compact)]
public struct Double4 : IEquatable<Double4>, ISpanFormattable, IFormattable- Implements
Constructors
Double4(Double2, double, double)
Initializes a new instance of the Double4 struct.
public Double4(Double2 value, double z, double w)Parameters
- valueDouble2
- A vector containing the values with which to initialize the X and Y components. 
- zdouble
- Initial value for the Z component of the vector. 
- wdouble
- Initial value for the W component of the vector. 
Double4(Double3, double)
Initializes a new instance of the Double4 struct.
public Double4(Double3 value, double w)Parameters
- valueDouble3
- A vector containing the values with which to initialize the X, Y, and Z components. 
- wdouble
- Initial value for the W component of the vector. 
Double4(Vector4)
Initializes a new instance of the Double4 struct.
public Double4(Vector4 v)Parameters
- vVector4
- The Vector4 to construct the Double4 from. 
Double4(double)
Initializes a new instance of the Double4 struct.
public Double4(double value)Parameters
- valuedouble
- The value that will be assigned to all components. 
Double4(double, double, double, double)
Initializes a new instance of the Double4 struct.
public Double4(double x, double y, double z, double w)Parameters
- xdouble
- Initial value for the X component of the vector. 
- ydouble
- Initial value for the Y component of the vector. 
- zdouble
- Initial value for the Z component of the vector. 
- wdouble
- Initial value for the W component of the vector. 
Double4(double[])
Initializes a new instance of the Double4 struct.
public Double4(double[] values)Parameters
- valuesdouble[]
- The values to assign to the X, Y, Z, and W components of the vector. This must be an array with four elements. 
Exceptions
- ArgumentNullException
- Thrown when - valuesis- null.
- ArgumentOutOfRangeException
- Thrown when - valuescontains more or less than four elements.
Fields
One
A Double4 with all of its components set to one.
public static readonly Double4 OneField Value
SizeInBytes
The size of the Double4 type, in bytes.
public static readonly int SizeInBytesField Value
UnitW
The W unit Double4 (0, 0, 0, 1).
public static readonly Double4 UnitWField Value
UnitX
The X unit Double4 (1, 0, 0, 0).
public static readonly Double4 UnitXField Value
UnitY
The Y unit Double4 (0, 1, 0, 0).
public static readonly Double4 UnitYField Value
UnitZ
The Z unit Double4 (0, 0, 1, 0).
public static readonly Double4 UnitZField Value
W
The W component of the vector.
[DataMember(3)]
public double WField Value
X
The X component of the vector.
[DataMember(0)]
public double XField Value
Y
The Y component of the vector.
[DataMember(1)]
public double YField Value
Z
The Z component of the vector.
[DataMember(2)]
public double ZField Value
Zero
A Double4 with all of its components set to zero.
public static readonly Double4 ZeroField Value
Properties
IsNormalized
Gets a value indicting whether this instance is normalized.
public readonly bool IsNormalized { get; }Property Value
this[int]
Gets or sets the component at the specified index.
public double this[int index] { readonly get; set; }Parameters
- indexint
- The index of the component to access. Use 0 for the X component, 1 for the Y component, 2 for the Z component, and 3 for the W component. 
Property Value
- double
- The value of the X, Y, Z, or W component, depending on the index. 
Exceptions
- ArgumentOutOfRangeException
- Thrown when the - indexis out of the range [0, 3].
Methods
Add(Double4, Double4)
Adds two vectors.
public static Double4 Add(Double4 left, Double4 right)Parameters
Returns
- Double4
- The sum of the two vectors. 
Add(ref readonly Double4, ref readonly Double4, out Double4)
Adds two vectors.
public static void Add(ref readonly Double4 left, ref readonly Double4 right, out Double4 result)Parameters
- leftDouble4
- The first vector to add. 
- rightDouble4
- The second vector to add. 
- resultDouble4
- When the method completes, contains the sum of the two vectors. 
Barycentric(Double4, Double4, Double4, double, double)
Returns a Double4 containing the 4D Cartesian coordinates of a point specified in Barycentric coordinates relative to a 4D triangle.
public static Double4 Barycentric(Double4 value1, Double4 value2, Double4 value3, double amount1, double amount2)Parameters
- value1Double4
- A Double4 containing the 4D Cartesian coordinates of vertex 1 of the triangle. 
- value2Double4
- A Double4 containing the 4D Cartesian coordinates of vertex 2 of the triangle. 
- value3Double4
- A Double4 containing the 4D Cartesian coordinates of vertex 3 of the triangle. 
- amount1double
- Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in - value2).
- amount2double
- Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in - value3).
Returns
Barycentric(ref readonly Double4, ref readonly Double4, ref readonly Double4, double, double, out Double4)
Returns a Double4 containing the 4D Cartesian coordinates of a point specified in Barycentric coordinates relative to a 4D triangle.
public static void Barycentric(ref readonly Double4 value1, ref readonly Double4 value2, ref readonly Double4 value3, double amount1, double amount2, out Double4 result)Parameters
- value1Double4
- A Double4 containing the 4D Cartesian coordinates of vertex 1 of the triangle. 
- value2Double4
- A Double4 containing the 4D Cartesian coordinates of vertex 2 of the triangle. 
- value3Double4
- A Double4 containing the 4D Cartesian coordinates of vertex 3 of the triangle. 
- amount1double
- Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in - value2).
- amount2double
- Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in - value3).
- resultDouble4
- When the method completes, contains the 4D Cartesian coordinates of the specified point. 
CatmullRom(Double4, Double4, Double4, Double4, double)
Performs a Catmull-Rom interpolation using the specified positions.
public static Double4 CatmullRom(Double4 value1, Double4 value2, Double4 value3, Double4 value4, double amount)Parameters
- value1Double4
- The first position in the interpolation. 
- value2Double4
- The second position in the interpolation. 
- value3Double4
- The third position in the interpolation. 
- value4Double4
- The fourth position in the interpolation. 
- amountdouble
- Weighting factor. 
Returns
- Double4
- A vector that is the result of the Catmull-Rom interpolation. 
CatmullRom(ref readonly Double4, ref readonly Double4, ref readonly Double4, ref readonly Double4, double, out Double4)
Performs a Catmull-Rom interpolation using the specified positions.
public static void CatmullRom(ref readonly Double4 value1, ref readonly Double4 value2, ref readonly Double4 value3, ref readonly Double4 value4, double amount, out Double4 result)Parameters
- value1Double4
- The first position in the interpolation. 
- value2Double4
- The second position in the interpolation. 
- value3Double4
- The third position in the interpolation. 
- value4Double4
- The fourth position in the interpolation. 
- amountdouble
- Weighting factor. 
- resultDouble4
- When the method completes, contains the result of the Catmull-Rom interpolation. 
Clamp(Double4, Double4, Double4)
Restricts a value to be within a specified range.
public static Double4 Clamp(Double4 value, Double4 min, Double4 max)Parameters
Returns
- Double4
- The clamped value. 
Clamp(ref readonly Double4, ref readonly Double4, ref readonly Double4, out Double4)
Restricts a value to be within a specified range.
public static void Clamp(ref readonly Double4 value, ref readonly Double4 min, ref readonly Double4 max, out Double4 result)Parameters
- valueDouble4
- The value to clamp. 
- minDouble4
- The minimum value. 
- maxDouble4
- The maximum value. 
- resultDouble4
- When the method completes, contains the clamped value. 
Deconstruct(out double, out double, out double, out double)
Deconstructs the vector's components into named variables.
public readonly void Deconstruct(out double x, out double y, out double z, out double w)Parameters
Demodulate(Double4, Double4)
Demodulates a vector with another by performing component-wise division.
public static Double4 Demodulate(Double4 left, Double4 right)Parameters
Returns
- Double4
- The demodulated vector. 
Demodulate(ref readonly Double4, ref readonly Double4, out Double4)
Demodulates a vector with another by performing component-wise division.
public static void Demodulate(ref readonly Double4 left, ref readonly Double4 right, out Double4 result)Parameters
- leftDouble4
- The first vector to demodulate. 
- rightDouble4
- The second vector to demodulate. 
- resultDouble4
- When the method completes, contains the demodulated vector. 
Distance(Double4, Double4)
Calculates the distance between two vectors.
public static double Distance(Double4 value1, Double4 value2)Parameters
Returns
- double
- The distance between the two vectors. 
Remarks
DistanceSquared(Double4, Double4) may be preferred when only the relative distance is needed and speed is of the essence.
Distance(ref readonly Double4, ref readonly Double4, out double)
Calculates the distance between two vectors.
public static void Distance(ref readonly Double4 value1, ref readonly Double4 value2, out double result)Parameters
- value1Double4
- The first vector. 
- value2Double4
- The second vector. 
- resultdouble
- When the method completes, contains the distance between the two vectors. 
Remarks
DistanceSquared(ref readonly Double4, ref readonly Double4, out double) may be preferred when only the relative distance is needed and speed is of the essence.
DistanceSquared(Double4, Double4)
Calculates the squared distance between two vectors.
public static double DistanceSquared(Double4 value1, Double4 value2)Parameters
Returns
- double
- The squared distance between the two vectors. 
Remarks
Distance squared is the value before taking the square root. Distance squared can often be used in place of distance if relative comparisons are being made. For example, consider three points A, B, and C. To determine whether B or C is further from A, compare the distance between A and B to the distance between A and C. Calculating the two distances involves two square roots, which are computationally expensive. However, using distance squared provides the same information and avoids calculating two square roots.
DistanceSquared(ref readonly Double4, ref readonly Double4, out double)
Calculates the squared distance between two vectors.
public static void DistanceSquared(ref readonly Double4 value1, ref readonly Double4 value2, out double result)Parameters
- value1Double4
- The first vector. 
- value2Double4
- The second vector. 
- resultdouble
- When the method completes, contains the squared distance between the two vectors. 
Remarks
Distance squared is the value before taking the square root. Distance squared can often be used in place of distance if relative comparisons are being made. For example, consider three points A, B, and C. To determine whether B or C is further from A, compare the distance between A and B to the distance between A and C. Calculating the two distances involves two square roots, which are computationally expensive. However, using distance squared provides the same information and avoids calculating two square roots.
Divide(Double4, double)
Scales a vector by the given value.
public static Double4 Divide(Double4 value, double scale)Parameters
Returns
- Double4
- The scaled vector. 
Divide(ref readonly Double4, double, out Double4)
Scales a vector by the given value.
public static void Divide(ref readonly Double4 value, double scale, out Double4 result)Parameters
- valueDouble4
- The vector to scale. 
- scaledouble
- The amount by which to scale the vector. 
- resultDouble4
- When the method completes, contains the scaled vector. 
Dot(Double4, Double4)
Calculates the dot product of two vectors.
public static double Dot(Double4 left, Double4 right)Parameters
Returns
- double
- The dot product of the two vectors. 
Dot(ref readonly Double4, ref readonly Double4, out double)
Calculates the dot product of two vectors.
public static void Dot(ref readonly Double4 left, ref readonly Double4 right, out double result)Parameters
- leftDouble4
- First source vector 
- rightDouble4
- Second source vector. 
- resultdouble
- When the method completes, contains the dot product of the two vectors. 
Equals(Double4)
Determines whether the specified Double4 is equal to this instance.
public readonly bool Equals(Double4 other)Parameters
Returns
Equals(object?)
Determines whether the specified object is equal to this instance.
public override readonly bool Equals(object? value)Parameters
- valueobject
- The object to compare with this instance. 
Returns
- bool
- trueif the specified object is equal to this instance; otherwise,- false.
GetHashCode()
Returns a hash code for this instance.
public override readonly int GetHashCode()Returns
- int
- A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. 
Hermite(Double4, Double4, Double4, Double4, double)
Performs a Hermite spline interpolation.
public static Double4 Hermite(Double4 value1, Double4 tangent1, Double4 value2, Double4 tangent2, double amount)Parameters
- value1Double4
- First source position vector. 
- tangent1Double4
- First source tangent vector. 
- value2Double4
- Second source position vector. 
- tangent2Double4
- Second source tangent vector. 
- amountdouble
- Weighting factor. 
Returns
- Double4
- The result of the Hermite spline interpolation. 
Hermite(ref readonly Double4, ref readonly Double4, ref readonly Double4, ref readonly Double4, double, out Double4)
Performs a Hermite spline interpolation.
public static void Hermite(ref readonly Double4 value1, ref readonly Double4 tangent1, ref readonly Double4 value2, ref readonly Double4 tangent2, double amount, out Double4 result)Parameters
- value1Double4
- First source position vector. 
- tangent1Double4
- First source tangent vector. 
- value2Double4
- Second source position vector. 
- tangent2Double4
- Second source tangent vector. 
- amountdouble
- Weighting factor. 
- resultDouble4
- When the method completes, contains the result of the Hermite spline interpolation. 
Length()
Calculates the length of the vector.
public readonly double Length()Returns
- double
- The length of the vector. 
Remarks
LengthSquared() may be preferred when only the relative length is needed and speed is of the essence.
LengthSquared()
Calculates the squared length of the vector.
public readonly double LengthSquared()Returns
- double
- The squared length of the vector. 
Remarks
This method may be preferred to Length() when only a relative length is needed and speed is of the essence.
Lerp(Double4, Double4, double)
Performs a linear interpolation between two vectors.
public static Double4 Lerp(Double4 start, Double4 end, double amount)Parameters
- startDouble4
- Start vector. 
- endDouble4
- End vector. 
- amountdouble
- Value between 0 and 1 indicating the weight of - end.
Returns
- Double4
- The linear interpolation of the two vectors. 
Remarks
This method performs the linear interpolation based on the following formula.
start + (end - start) * amount
Passing amount a value of 0 will cause start to be returned; a value of 1 will cause end to be returned.
Lerp(ref readonly Double4, ref readonly Double4, double, out Double4)
Performs a linear interpolation between two vectors.
public static void Lerp(ref readonly Double4 start, ref readonly Double4 end, double amount, out Double4 result)Parameters
- startDouble4
- Start vector. 
- endDouble4
- End vector. 
- amountdouble
- Value between 0 and 1 indicating the weight of - end.
- resultDouble4
- When the method completes, contains the linear interpolation of the two vectors. 
Remarks
This method performs the linear interpolation based on the following formula.
start + (end - start) * amount
Passing amount a value of 0 will cause start to be returned; a value of 1 will cause end to be returned.
Max(Double4, Double4)
Returns a vector containing the largest components of the specified vectors.
public static Double4 Max(Double4 left, Double4 right)Parameters
Returns
- Double4
- A vector containing the largest components of the source vectors. 
Max(ref readonly Double4, ref readonly Double4, out Double4)
Returns a vector containing the smallest components of the specified vectors.
public static void Max(ref readonly Double4 left, ref readonly Double4 right, out Double4 result)Parameters
- leftDouble4
- The first source vector. 
- rightDouble4
- The second source vector. 
- resultDouble4
- When the method completes, contains an new vector composed of the largest components of the source vectors. 
Min(Double4, Double4)
Returns a vector containing the smallest components of the specified vectors.
public static Double4 Min(Double4 left, Double4 right)Parameters
Returns
- Double4
- A vector containing the smallest components of the source vectors. 
Min(ref readonly Double4, ref readonly Double4, out Double4)
Returns a vector containing the smallest components of the specified vectors.
public static void Min(ref readonly Double4 left, ref readonly Double4 right, out Double4 result)Parameters
- leftDouble4
- The first source vector. 
- rightDouble4
- The second source vector. 
- resultDouble4
- When the method completes, contains an new vector composed of the smallest components of the source vectors. 
Modulate(Double4, Double4)
Modulates a vector with another by performing component-wise multiplication.
public static Double4 Modulate(Double4 left, Double4 right)Parameters
Returns
- Double4
- The modulated vector. 
Modulate(ref readonly Double4, ref readonly Double4, out Double4)
Modulates a vector with another by performing component-wise multiplication.
public static void Modulate(ref readonly Double4 left, ref readonly Double4 right, out Double4 result)Parameters
- leftDouble4
- The first vector to modulate. 
- rightDouble4
- The second vector to modulate. 
- resultDouble4
- When the method completes, contains the modulated vector. 
Multiply(Double4, double)
Scales a vector by the given value.
public static Double4 Multiply(Double4 value, double scale)Parameters
Returns
- Double4
- The scaled vector. 
Multiply(ref readonly Double4, double, out Double4)
Scales a vector by the given value.
public static void Multiply(ref readonly Double4 value, double scale, out Double4 result)Parameters
- valueDouble4
- The vector to scale. 
- scaledouble
- The amount by which to scale the vector. 
- resultDouble4
- When the method completes, contains the scaled vector. 
Negate(Double4)
Reverses the direction of a given vector.
public static Double4 Negate(Double4 value)Parameters
- valueDouble4
- The vector to negate. 
Returns
- Double4
- A vector facing in the opposite direction. 
Negate(ref readonly Double4, out Double4)
Reverses the direction of a given vector.
public static void Negate(ref readonly Double4 value, out Double4 result)Parameters
- valueDouble4
- The vector to negate. 
- resultDouble4
- When the method completes, contains a vector facing in the opposite direction. 
Normalize()
Converts the vector into a unit vector.
public void Normalize()Normalize(Double4)
Converts the vector into a unit vector.
public static Double4 Normalize(Double4 value)Parameters
- valueDouble4
- The vector to normalize. 
Returns
- Double4
- The normalized vector. 
Normalize(ref readonly Double4, out Double4)
Converts the vector into a unit vector.
public static void Normalize(ref readonly Double4 value, out Double4 result)Parameters
- valueDouble4
- The vector to normalize. 
- resultDouble4
- When the method completes, contains the normalized vector. 
Orthogonalize(Double4[], params Double4[])
Orthogonalizes a list of vectors.
public static void Orthogonalize(Double4[] destination, params Double4[] source)Parameters
- destinationDouble4[]
- The list of orthogonalized vectors. 
- sourceDouble4[]
- The list of vectors to orthogonalize. 
Remarks
Orthogonalization is the process of making all vectors orthogonal to each other. This means that any given vector in the list will be orthogonal to any other given vector in the list.
Because this method uses the modified Gram-Schmidt process, the resulting vectors tend to be numerically unstable. The numeric stability decreases according to the vectors position in the list so that the first vector is the most stable and the last vector is the least stable.
Exceptions
- ArgumentNullException
- Thrown when - sourceor- destinationis- null.
- ArgumentOutOfRangeException
- Thrown when - destinationis shorter in length than- source.
Orthonormalize(Double4[], params Double4[])
Orthonormalizes a list of vectors.
public static void Orthonormalize(Double4[] destination, params Double4[] source)Parameters
- destinationDouble4[]
- The list of orthonormalized vectors. 
- sourceDouble4[]
- The list of vectors to orthonormalize. 
Remarks
Orthonormalization is the process of making all vectors orthogonal to each other and making all vectors of unit length. This means that any given vector will be orthogonal to any other given vector in the list.
Because this method uses the modified Gram-Schmidt process, the resulting vectors tend to be numerically unstable. The numeric stability decreases according to the vectors position in the list so that the first vector is the most stable and the last vector is the least stable.
Exceptions
- ArgumentNullException
- Thrown when - sourceor- destinationis- null.
- ArgumentOutOfRangeException
- Thrown when - destinationis shorter in length than- source.
Pow(double)
Raises the exponent for each components.
public void Pow(double exponent)Parameters
- exponentdouble
- The exponent. 
SmoothStep(Double4, Double4, double)
Performs a cubic interpolation between two vectors.
public static Double4 SmoothStep(Double4 start, Double4 end, double amount)Parameters
- startDouble4
- Start vector. 
- endDouble4
- End vector. 
- amountdouble
- Value between 0 and 1 indicating the weight of - end.
Returns
- Double4
- The cubic interpolation of the two vectors. 
SmoothStep(ref readonly Double4, ref readonly Double4, double, out Double4)
Performs a cubic interpolation between two vectors.
public static void SmoothStep(ref readonly Double4 start, ref readonly Double4 end, double amount, out Double4 result)Parameters
- startDouble4
- Start vector. 
- endDouble4
- End vector. 
- amountdouble
- Value between 0 and 1 indicating the weight of - end.
- resultDouble4
- When the method completes, contains the cubic interpolation of the two vectors. 
Subtract(Double4, Double4)
Subtracts two vectors.
public static Double4 Subtract(Double4 left, Double4 right)Parameters
Returns
- Double4
- The difference of the two vectors. 
Subtract(ref readonly Double4, ref readonly Double4, out Double4)
Subtracts two vectors.
public static void Subtract(ref readonly Double4 left, ref readonly Double4 right, out Double4 result)Parameters
- leftDouble4
- The first vector to subtract. 
- rightDouble4
- The second vector to subtract. 
- resultDouble4
- When the method completes, contains the difference of the two vectors. 
ToArray()
Creates an array containing the elements of the vector.
public readonly double[] ToArray()Returns
- double[]
- A four-element array containing the components of the vector. 
ToString()
Returns a string that represents this instance.
public override readonly string ToString()Returns
ToString(string?, IFormatProvider?)
Returns a string that represents this instance.
public readonly string ToString(string? format, IFormatProvider? formatProvider)Parameters
- formatstring
- The format. 
- formatProviderIFormatProvider
- The format provider. 
Returns
Transform(Double4, Matrix)
Transforms a 4D vector by the given Matrix.
public static Double4 Transform(Double4 vector, Matrix transform)Parameters
Returns
Transform(Double4, Quaternion)
Transforms a 4D vector by the given Quaternion rotation.
public static Double4 Transform(Double4 vector, Quaternion rotation)Parameters
- vectorDouble4
- The vector to rotate. 
- rotationQuaternion
- The Quaternion rotation to apply. 
Returns
Transform(ref readonly Double4, ref readonly Matrix, out Double4)
Transforms a 4D vector by the given Matrix.
public static void Transform(ref readonly Double4 vector, ref readonly Matrix transform, out Double4 result)Parameters
- vectorDouble4
- The source vector. 
- transformMatrix
- The transformation Matrix. 
- resultDouble4
- When the method completes, contains the transformed Double4. 
Transform(ref readonly Double4, ref readonly Quaternion, out Double4)
Transforms a 4D vector by the given Quaternion rotation.
public static void Transform(ref readonly Double4 vector, ref readonly Quaternion rotation, out Double4 result)Parameters
- vectorDouble4
- The vector to rotate. 
- rotationQuaternion
- The Quaternion rotation to apply. 
- resultDouble4
- When the method completes, contains the transformed Double4. 
Transform(Double4[], ref readonly Matrix, Double4[])
Transforms an array of 4D vectors by the given Matrix.
public static void Transform(Double4[] source, ref readonly Matrix transform, Double4[] destination)Parameters
- sourceDouble4[]
- The array of vectors to transform. 
- transformMatrix
- The transformation Matrix. 
- destinationDouble4[]
- The array for which the transformed vectors are stored. This array may be the same array as - source.
Exceptions
- ArgumentNullException
- Thrown when - sourceor- destinationis- null.
- ArgumentOutOfRangeException
- Thrown when - destinationis shorter in length than- source.
Transform(Double4[], ref readonly Quaternion, Double4[])
Transforms an array of vectors by the given Quaternion rotation.
public static void Transform(Double4[] source, ref readonly Quaternion rotation, Double4[] destination)Parameters
- sourceDouble4[]
- The array of vectors to transform. 
- rotationQuaternion
- The Quaternion rotation to apply. 
- destinationDouble4[]
- The array for which the transformed vectors are stored. This array may be the same array as - source.
Exceptions
- ArgumentNullException
- Thrown when - sourceor- destinationis- null.
- ArgumentOutOfRangeException
- Thrown when - destinationis shorter in length than- source.
Operators
operator +(Double4, Double4)
Adds two vectors.
public static Double4 operator +(Double4 left, Double4 right)Parameters
Returns
- Double4
- The sum of the two vectors. 
operator /(Double4, Double4)
Divides a vector by the given vector, component-wise.
public static Double4 operator /(Double4 value, Double4 by)Parameters
Returns
- Double4
- The scaled vector. 
operator /(Double4, double)
Scales a vector by the given value.
public static Double4 operator /(Double4 value, double scale)Parameters
Returns
- Double4
- The scaled vector. 
operator /(double, Double4)
Divides a numerator by a vector.
public static Double4 operator /(double numerator, Double4 value)Parameters
Returns
- Double4
- The scaled vector. 
operator ==(Double4, Double4)
Tests for equality between two objects.
public static bool operator ==(Double4 left, Double4 right)Parameters
Returns
- bool
- trueif- lefthas the same value as- right; otherwise,- false.
explicit operator Double2(Double4)
public static explicit operator Double2(Double4 value)Parameters
- valueDouble4
- The value. 
Returns
- Double2
- The result of the conversion. 
explicit operator Double3(Double4)
public static explicit operator Double3(Double4 value)Parameters
- valueDouble4
- The value. 
Returns
- Double3
- The result of the conversion. 
explicit operator Half4(Double4)
public static explicit operator Half4(Double4 value)Parameters
- valueDouble4
- The value. 
Returns
- Half4
- The result of the conversion. 
explicit operator Vector4(Double4)
public static explicit operator Vector4(Double4 value)Parameters
- valueDouble4
- The value. 
Returns
- Vector4
- The result of the conversion. 
explicit operator Vector4(Double4)
Casts from Stride.Maths to System.Numerics vectors
public static explicit operator Vector4(Double4 v)Parameters
- vDouble4
- Value to cast 
Returns
explicit operator Double4(Half4)
public static explicit operator Double4(Half4 value)Parameters
- valueHalf4
- The value. 
Returns
- Double4
- The result of the conversion. 
implicit operator Double4(Vector4)
public static implicit operator Double4(Vector4 value)Parameters
- valueVector4
- The value. 
Returns
- Double4
- The result of the conversion. 
implicit operator Double4(Vector4)
Casts from System.Numerics to Stride.Maths vectors
public static implicit operator Double4(Vector4 v)Parameters
- vVector4
- Value to cast 
Returns
operator !=(Double4, Double4)
Tests for inequality between two objects.
public static bool operator !=(Double4 left, Double4 right)Parameters
Returns
- bool
- trueif- lefthas a different value than- right; otherwise,- false.
operator *(Double4, Double4)
Modulates a vector with another by performing component-wise multiplication.
public static Double4 operator *(Double4 left, Double4 right)Parameters
Returns
- Double4
- The multiplication of the two vectors. 
operator *(Double4, double)
Scales a vector by the given value.
public static Double4 operator *(Double4 value, double scale)Parameters
Returns
- Double4
- The scaled vector. 
operator *(double, Double4)
Scales a vector by the given value.
public static Double4 operator *(double scale, Double4 value)Parameters
Returns
- Double4
- The scaled vector. 
operator -(Double4, Double4)
Subtracts two vectors.
public static Double4 operator -(Double4 left, Double4 right)Parameters
Returns
- Double4
- The difference of the two vectors. 
operator -(Double4)
Reverses the direction of a given vector.
public static Double4 operator -(Double4 value)Parameters
- valueDouble4
- The vector to negate. 
Returns
- Double4
- A vector facing in the opposite direction. 
operator +(Double4)
Assert a vector (return it unchanged).
public static Double4 operator +(Double4 value)Parameters
- valueDouble4
- The vector to assert (unchange). 
Returns
- Double4
- The asserted (unchanged) vector.