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>, IFormattable
- Implements
Constructors
Double4(Double2, double, double)
Initializes a new instance of the Double4 struct.
public Double4(Double2 value, double z, double w)
Parameters
value
Double2A vector containing the values with which to initialize the X and Y components.
z
doubleInitial value for the Z component of the vector.
w
doubleInitial 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
value
Double3A vector containing the values with which to initialize the X, Y, and Z components.
w
doubleInitial value for the W component of the vector.
Double4(Vector4)
Initializes a new instance of the Double4 struct.
public Double4(Vector4 v)
Parameters
v
Vector4The Vector4 to construct the Double4 from.
Double4(double)
Initializes a new instance of the Double4 struct.
public Double4(double value)
Parameters
value
doubleThe 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
x
doubleInitial value for the X component of the vector.
y
doubleInitial value for the Y component of the vector.
z
doubleInitial value for the Z component of the vector.
w
doubleInitial value for the W component of the vector.
Double4(double[])
Initializes a new instance of the Double4 struct.
public Double4(double[] values)
Parameters
values
double[]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
values
isnull
.- ArgumentOutOfRangeException
Thrown when
values
contains more or less than four elements.
Fields
One
A Double4 with all of its components set to one.
public static readonly Double4 One
Field Value
SizeInBytes
The size of the Double4 type, in bytes.
public static readonly int SizeInBytes
Field Value
UnitW
The W unit Double4 (0, 0, 0, 1).
public static readonly Double4 UnitW
Field Value
UnitX
The X unit Double4 (1, 0, 0, 0).
public static readonly Double4 UnitX
Field Value
UnitY
The Y unit Double4 (0, 1, 0, 0).
public static readonly Double4 UnitY
Field Value
UnitZ
The Z unit Double4 (0, 0, 1, 0).
public static readonly Double4 UnitZ
Field Value
W
The W component of the vector.
[DataMember(3)]
public double W
Field Value
X
The X component of the vector.
[DataMember(0)]
public double X
Field Value
Y
The Y component of the vector.
[DataMember(1)]
public double Y
Field Value
Z
The Z component of the vector.
[DataMember(2)]
public double Z
Field Value
Zero
A Double4 with all of its components set to zero.
public static readonly Double4 Zero
Field Value
Properties
IsNormalized
Gets a value indicting whether this instance is normalized.
public bool IsNormalized { get; }
Property Value
this[int]
Gets or sets the component at the specified index.
public double this[int index] { get; set; }
Parameters
index
intThe 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
index
is 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
left
Double4The first vector to add.
right
Double4The second vector to add.
result
Double4When 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
value1
Double4A Double4 containing the 4D Cartesian coordinates of vertex 1 of the triangle.
value2
Double4A Double4 containing the 4D Cartesian coordinates of vertex 2 of the triangle.
value3
Double4A Double4 containing the 4D Cartesian coordinates of vertex 3 of the triangle.
amount1
doubleBarycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in
value2
).amount2
doubleBarycentric 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
value1
Double4A Double4 containing the 4D Cartesian coordinates of vertex 1 of the triangle.
value2
Double4A Double4 containing the 4D Cartesian coordinates of vertex 2 of the triangle.
value3
Double4A Double4 containing the 4D Cartesian coordinates of vertex 3 of the triangle.
amount1
doubleBarycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in
value2
).amount2
doubleBarycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in
value3
).result
Double4When 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
value1
Double4The first position in the interpolation.
value2
Double4The second position in the interpolation.
value3
Double4The third position in the interpolation.
value4
Double4The fourth position in the interpolation.
amount
doubleWeighting 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
value1
Double4The first position in the interpolation.
value2
Double4The second position in the interpolation.
value3
Double4The third position in the interpolation.
value4
Double4The fourth position in the interpolation.
amount
doubleWeighting factor.
result
Double4When 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
value
Double4The value to clamp.
min
Double4The minimum value.
max
Double4The maximum value.
result
Double4When 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 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
left
Double4The first vector to demodulate.
right
Double4The second vector to demodulate.
result
Double4When 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
value1
Double4The first vector.
value2
Double4The second vector.
result
doubleWhen 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
value1
Double4The first vector.
value2
Double4The second vector.
result
doubleWhen 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
value
Double4The vector to scale.
scale
doubleThe amount by which to scale the vector.
result
Double4When 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
left
Double4First source vector
right
Double4Second source vector.
result
doubleWhen the method completes, contains the dot product of the two vectors.
Equals(Double4)
Determines whether the specified Double4 is equal to this instance.
public bool Equals(Double4 other)
Parameters
Returns
Equals(object)
Determines whether the specified object is equal to this instance.
public override bool Equals(object value)
Parameters
Returns
GetHashCode()
Returns a hash code for this instance.
public override 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
value1
Double4First source position vector.
tangent1
Double4First source tangent vector.
value2
Double4Second source position vector.
tangent2
Double4Second source tangent vector.
amount
doubleWeighting 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
value1
Double4First source position vector.
tangent1
Double4First source tangent vector.
value2
Double4Second source position vector.
tangent2
Double4Second source tangent vector.
amount
doubleWeighting factor.
result
Double4When the method completes, contains the result of the Hermite spline interpolation.
Length()
Calculates the length of the vector.
public 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 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
start
Double4Start vector.
end
Double4End vector.
amount
doubleValue 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
start
Double4Start vector.
end
Double4End vector.
amount
doubleValue between 0 and 1 indicating the weight of
end
.result
Double4When 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
left
Double4The first source vector.
right
Double4The second source vector.
result
Double4When 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
left
Double4The first source vector.
right
Double4The second source vector.
result
Double4When 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
left
Double4The first vector to modulate.
right
Double4The second vector to modulate.
result
Double4When 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
value
Double4The vector to scale.
scale
doubleThe amount by which to scale the vector.
result
Double4When the method completes, contains the scaled vector.
Negate(Double4)
Reverses the direction of a given vector.
public static Double4 Negate(Double4 value)
Parameters
value
Double4The 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
value
Double4The vector to negate.
result
Double4When 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
value
Double4The 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
value
Double4The vector to normalize.
result
Double4When 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
destination
Double4[]The list of orthogonalized vectors.
source
Double4[]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
source
ordestination
isnull
.- ArgumentOutOfRangeException
Thrown when
destination
is shorter in length thansource
.
Orthonormalize(Double4[], params Double4[])
Orthonormalizes a list of vectors.
public static void Orthonormalize(Double4[] destination, params Double4[] source)
Parameters
destination
Double4[]The list of orthonormalized vectors.
source
Double4[]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
source
ordestination
isnull
.- ArgumentOutOfRangeException
Thrown when
destination
is shorter in length thansource
.
Pow(double)
Raises the exponent for each components.
public void Pow(double exponent)
Parameters
exponent
doubleThe exponent.
SmoothStep(Double4, Double4, double)
Performs a cubic interpolation between two vectors.
public static Double4 SmoothStep(Double4 start, Double4 end, double amount)
Parameters
start
Double4Start vector.
end
Double4End vector.
amount
doubleValue 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
start
Double4Start vector.
end
Double4End vector.
amount
doubleValue between 0 and 1 indicating the weight of
end
.result
Double4When 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
left
Double4The first vector to subtract.
right
Double4The second vector to subtract.
result
Double4When the method completes, contains the difference of the two vectors.
ToArray()
Creates an array containing the elements of the vector.
public double[] ToArray()
Returns
- double[]
A four-element array containing the components of the vector.
ToString()
Returns a string that represents this instance.
public override string ToString()
Returns
ToString(IFormatProvider)
Returns a string that represents this instance.
public string ToString(IFormatProvider formatProvider)
Parameters
formatProvider
IFormatProviderThe format provider.
Returns
ToString(string)
Returns a string that represents this instance.
public string ToString(string format)
Parameters
format
stringThe format.
Returns
ToString(string, IFormatProvider)
Returns a string that represents this instance.
public string ToString(string format, IFormatProvider formatProvider)
Parameters
format
stringThe format.
formatProvider
IFormatProviderThe 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
vector
Double4The vector to rotate.
rotation
QuaternionThe 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
vector
Double4The source vector.
transform
MatrixThe transformation Matrix.
result
Double4When 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
vector
Double4The vector to rotate.
rotation
QuaternionThe Quaternion rotation to apply.
result
Double4When 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
source
Double4[]The array of vectors to transform.
transform
MatrixThe transformation Matrix.
destination
Double4[]The array for which the transformed vectors are stored. This array may be the same array as
source
.
Exceptions
- ArgumentNullException
Thrown when
source
ordestination
isnull
.- ArgumentOutOfRangeException
Thrown when
destination
is shorter in length thansource
.
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
source
Double4[]The array of vectors to transform.
rotation
QuaternionThe Quaternion rotation to apply.
destination
Double4[]The array for which the transformed vectors are stored. This array may be the same array as
source
.
Exceptions
- ArgumentNullException
Thrown when
source
ordestination
isnull
.- ArgumentOutOfRangeException
Thrown when
destination
is shorter in length thansource
.
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
true
ifleft
has the same value asright
; otherwise,false
.
explicit operator Double2(Double4)
public static explicit operator Double2(Double4 value)
Parameters
value
Double4The value.
Returns
- Double2
The result of the conversion.
explicit operator Double3(Double4)
public static explicit operator Double3(Double4 value)
Parameters
value
Double4The value.
Returns
- Double3
The result of the conversion.
explicit operator Half4(Double4)
public static explicit operator Half4(Double4 value)
Parameters
value
Double4The value.
Returns
- Half4
The result of the conversion.
explicit operator Vector4(Double4)
public static explicit operator Vector4(Double4 value)
Parameters
value
Double4The value.
Returns
- Vector4
The result of the conversion.
explicit operator Double4(Half4)
public static explicit operator Double4(Half4 value)
Parameters
value
Half4The value.
Returns
- Double4
The result of the conversion.
implicit operator Double4(Vector4)
public static implicit operator Double4(Vector4 value)
Parameters
value
Vector4The value.
Returns
- Double4
The result of the conversion.
operator !=(Double4, Double4)
Tests for inequality between two objects.
public static bool operator !=(Double4 left, Double4 right)
Parameters
Returns
- bool
true
ifleft
has a different value thanright
; 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
value
Double4The 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
value
Double4The vector to assert (unchange).
Returns
- Double4
The asserted (unchanged) vector.