Table of Contents

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 Double2

A vector containing the values with which to initialize the X and Y components.

z double

Initial value for the Z component of the vector.

w double

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

value Double3

A vector containing the values with which to initialize the X, Y, and Z components.

w double

Initial value for the W component of the vector.

Double4(Vector4)

Initializes a new instance of the Double4 struct.

public Double4(Vector4 v)

Parameters

v Vector4

The Vector4 to construct the Double4 from.

Double4(double)

Initializes a new instance of the Double4 struct.

public Double4(double value)

Parameters

value double

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

x double

Initial value for the X component of the vector.

y double

Initial value for the Y component of the vector.

z double

Initial value for the Z component of the vector.

w double

Initial 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 is null.

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

Double4

SizeInBytes

The size of the Double4 type, in bytes.

public static readonly int SizeInBytes

Field Value

int

UnitW

The W unit Double4 (0, 0, 0, 1).

public static readonly Double4 UnitW

Field Value

Double4

UnitX

The X unit Double4 (1, 0, 0, 0).

public static readonly Double4 UnitX

Field Value

Double4

UnitY

The Y unit Double4 (0, 1, 0, 0).

public static readonly Double4 UnitY

Field Value

Double4

UnitZ

The Z unit Double4 (0, 0, 1, 0).

public static readonly Double4 UnitZ

Field Value

Double4

W

The W component of the vector.

[DataMember(3)]
public double W

Field Value

double

X

The X component of the vector.

[DataMember(0)]
public double X

Field Value

double

Y

The Y component of the vector.

[DataMember(1)]
public double Y

Field Value

double

Z

The Z component of the vector.

[DataMember(2)]
public double Z

Field Value

double

Zero

A Double4 with all of its components set to zero.

public static readonly Double4 Zero

Field Value

Double4

Properties

IsNormalized

Gets a value indicting whether this instance is normalized.

public bool IsNormalized { get; }

Property Value

bool

this[int]

Gets or sets the component at the specified index.

public double this[int index] { get; set; }

Parameters

index int

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 index is out of the range [0, 3].

Methods

Add(Double4, Double4)

Adds two vectors.

public static Double4 Add(Double4 left, Double4 right)

Parameters

left Double4

The first vector to add.

right Double4

The second vector to add.

Returns

Double4

The sum of the two vectors.

Add(ref Double4, ref Double4, out Double4)

Adds two vectors.

public static void Add(ref Double4 left, ref Double4 right, out Double4 result)

Parameters

left Double4

The first vector to add.

right Double4

The second vector to add.

result Double4

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

value1 Double4

A Double4 containing the 4D Cartesian coordinates of vertex 1 of the triangle.

value2 Double4

A Double4 containing the 4D Cartesian coordinates of vertex 2 of the triangle.

value3 Double4

A Double4 containing the 4D Cartesian coordinates of vertex 3 of the triangle.

amount1 double

Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in value2).

amount2 double

Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in value3).

Returns

Double4

A new Double4 containing the 4D Cartesian coordinates of the specified point.

Barycentric(ref Double4, ref Double4, ref 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 Double4 value1, ref Double4 value2, ref Double4 value3, double amount1, double amount2, out Double4 result)

Parameters

value1 Double4

A Double4 containing the 4D Cartesian coordinates of vertex 1 of the triangle.

value2 Double4

A Double4 containing the 4D Cartesian coordinates of vertex 2 of the triangle.

value3 Double4

A Double4 containing the 4D Cartesian coordinates of vertex 3 of the triangle.

amount1 double

Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in value2).

amount2 double

Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in value3).

result Double4

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

value1 Double4

The first position in the interpolation.

value2 Double4

The second position in the interpolation.

value3 Double4

The third position in the interpolation.

value4 Double4

The fourth position in the interpolation.

amount double

Weighting factor.

Returns

Double4

A vector that is the result of the Catmull-Rom interpolation.

CatmullRom(ref Double4, ref Double4, ref Double4, ref Double4, double, out Double4)

Performs a Catmull-Rom interpolation using the specified positions.

public static void CatmullRom(ref Double4 value1, ref Double4 value2, ref Double4 value3, ref Double4 value4, double amount, out Double4 result)

Parameters

value1 Double4

The first position in the interpolation.

value2 Double4

The second position in the interpolation.

value3 Double4

The third position in the interpolation.

value4 Double4

The fourth position in the interpolation.

amount double

Weighting factor.

result Double4

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

value Double4

The value to clamp.

min Double4

The minimum value.

max Double4

The maximum value.

Returns

Double4

The clamped value.

Clamp(ref Double4, ref Double4, ref Double4, out Double4)

Restricts a value to be within a specified range.

public static void Clamp(ref Double4 value, ref Double4 min, ref Double4 max, out Double4 result)

Parameters

value Double4

The value to clamp.

min Double4

The minimum value.

max Double4

The maximum value.

result Double4

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 void Deconstruct(out double x, out double y, out double z, out double w)

Parameters

x double

The X component

y double

The Y component

z double

The Z component

w double

The W component

Demodulate(Double4, Double4)

Demodulates a vector with another by performing component-wise division.

public static Double4 Demodulate(Double4 left, Double4 right)

Parameters

left Double4

The first vector to demodulate.

right Double4

The second vector to demodulate.

Returns

Double4

The demodulated vector.

Demodulate(ref Double4, ref Double4, out Double4)

Demodulates a vector with another by performing component-wise division.

public static void Demodulate(ref Double4 left, ref Double4 right, out Double4 result)

Parameters

left Double4

The first vector to demodulate.

right Double4

The second vector to demodulate.

result Double4

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

value1 Double4

The first vector.

value2 Double4

The second vector.

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 Double4, ref Double4, out double)

Calculates the distance between two vectors.

public static void Distance(ref Double4 value1, ref Double4 value2, out double result)

Parameters

value1 Double4

The first vector.

value2 Double4

The second vector.

result double

When the method completes, contains the distance between the two vectors.

Remarks

DistanceSquared(ref Double4, ref 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

value1 Double4

The first vector.

value2 Double4

The second vector.

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 Double4, ref Double4, out double)

Calculates the squared distance between two vectors.

public static void DistanceSquared(ref Double4 value1, ref Double4 value2, out double result)

Parameters

value1 Double4

The first vector.

value2 Double4

The second vector.

result double

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

value Double4

The vector to scale.

scale double

The amount by which to scale the vector.

Returns

Double4

The scaled vector.

Divide(ref Double4, double, out Double4)

Scales a vector by the given value.

public static void Divide(ref Double4 value, double scale, out Double4 result)

Parameters

value Double4

The vector to scale.

scale double

The amount by which to scale the vector.

result Double4

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

left Double4

First source vector.

right Double4

Second source vector.

Returns

double

The dot product of the two vectors.

Dot(ref Double4, ref Double4, out double)

Calculates the dot product of two vectors.

public static void Dot(ref Double4 left, ref Double4 right, out double result)

Parameters

left Double4

First source vector

right Double4

Second source vector.

result double

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 bool Equals(Double4 other)

Parameters

other Double4

The Double4 to compare with this instance.

Returns

bool

true if the specified Double4 is equal to this instance; otherwise, false.

Equals(object)

Determines whether the specified object is equal to this instance.

public override bool Equals(object value)

Parameters

value object

The object to compare with this instance.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

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 Double4

First source position vector.

tangent1 Double4

First source tangent vector.

value2 Double4

Second source position vector.

tangent2 Double4

Second source tangent vector.

amount double

Weighting factor.

Returns

Double4

The result of the Hermite spline interpolation.

Hermite(ref Double4, ref Double4, ref Double4, ref Double4, double, out Double4)

Performs a Hermite spline interpolation.

public static void Hermite(ref Double4 value1, ref Double4 tangent1, ref Double4 value2, ref Double4 tangent2, double amount, out Double4 result)

Parameters

value1 Double4

First source position vector.

tangent1 Double4

First source tangent vector.

value2 Double4

Second source position vector.

tangent2 Double4

Second source tangent vector.

amount double

Weighting factor.

result Double4

When 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 Double4

Start vector.

end Double4

End vector.

amount double

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 Double4, ref Double4, double, out Double4)

Performs a linear interpolation between two vectors.

public static void Lerp(ref Double4 start, ref Double4 end, double amount, out Double4 result)

Parameters

start Double4

Start vector.

end Double4

End vector.

amount double

Value between 0 and 1 indicating the weight of end.

result Double4

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

left Double4

The first source vector.

right Double4

The second source vector.

Returns

Double4

A vector containing the largest components of the source vectors.

Max(ref Double4, ref Double4, out Double4)

Returns a vector containing the smallest components of the specified vectors.

public static void Max(ref Double4 left, ref Double4 right, out Double4 result)

Parameters

left Double4

The first source vector.

right Double4

The second source vector.

result Double4

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

left Double4

The first source vector.

right Double4

The second source vector.

Returns

Double4

A vector containing the smallest components of the source vectors.

Min(ref Double4, ref Double4, out Double4)

Returns a vector containing the smallest components of the specified vectors.

public static void Min(ref Double4 left, ref Double4 right, out Double4 result)

Parameters

left Double4

The first source vector.

right Double4

The second source vector.

result Double4

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

left Double4

The first vector to modulate.

right Double4

The second vector to modulate.

Returns

Double4

The modulated vector.

Modulate(ref Double4, ref Double4, out Double4)

Modulates a vector with another by performing component-wise multiplication.

public static void Modulate(ref Double4 left, ref Double4 right, out Double4 result)

Parameters

left Double4

The first vector to modulate.

right Double4

The second vector to modulate.

result Double4

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

value Double4

The vector to scale.

scale double

The amount by which to scale the vector.

Returns

Double4

The scaled vector.

Multiply(ref Double4, double, out Double4)

Scales a vector by the given value.

public static void Multiply(ref Double4 value, double scale, out Double4 result)

Parameters

value Double4

The vector to scale.

scale double

The amount by which to scale the vector.

result Double4

When the method completes, contains the scaled vector.

Negate(Double4)

Reverses the direction of a given vector.

public static Double4 Negate(Double4 value)

Parameters

value Double4

The vector to negate.

Returns

Double4

A vector facing in the opposite direction.

Negate(ref Double4, out Double4)

Reverses the direction of a given vector.

public static void Negate(ref Double4 value, out Double4 result)

Parameters

value Double4

The vector to negate.

result Double4

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

value Double4

The vector to normalize.

Returns

Double4

The normalized vector.

Normalize(ref Double4, out Double4)

Converts the vector into a unit vector.

public static void Normalize(ref Double4 value, out Double4 result)

Parameters

value Double4

The vector to normalize.

result Double4

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

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 or destination is null.

ArgumentOutOfRangeException

Thrown when destination is shorter in length than source.

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 or destination is null.

ArgumentOutOfRangeException

Thrown when destination is shorter in length than source.

Pow(double)

Raises the exponent for each components.

public void Pow(double exponent)

Parameters

exponent double

The exponent.

SmoothStep(Double4, Double4, double)

Performs a cubic interpolation between two vectors.

public static Double4 SmoothStep(Double4 start, Double4 end, double amount)

Parameters

start Double4

Start vector.

end Double4

End vector.

amount double

Value between 0 and 1 indicating the weight of end.

Returns

Double4

The cubic interpolation of the two vectors.

SmoothStep(ref Double4, ref Double4, double, out Double4)

Performs a cubic interpolation between two vectors.

public static void SmoothStep(ref Double4 start, ref Double4 end, double amount, out Double4 result)

Parameters

start Double4

Start vector.

end Double4

End vector.

amount double

Value between 0 and 1 indicating the weight of end.

result Double4

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

left Double4

The first vector to subtract.

right Double4

The second vector to subtract.

Returns

Double4

The difference of the two vectors.

Subtract(ref Double4, ref Double4, out Double4)

Subtracts two vectors.

public static void Subtract(ref Double4 left, ref Double4 right, out Double4 result)

Parameters

left Double4

The first vector to subtract.

right Double4

The second vector to subtract.

result Double4

When 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

string

A string that represents this instance.

ToString(IFormatProvider)

Returns a string that represents this instance.

public string ToString(IFormatProvider formatProvider)

Parameters

formatProvider IFormatProvider

The format provider.

Returns

string

A string that represents this instance.

ToString(string)

Returns a string that represents this instance.

public string ToString(string format)

Parameters

format string

The format.

Returns

string

A string that represents this instance.

ToString(string, IFormatProvider)

Returns a string that represents this instance.

public string ToString(string format, IFormatProvider formatProvider)

Parameters

format string

The format.

formatProvider IFormatProvider

The format provider.

Returns

string

A string that represents this instance.

Transform(Double4, Matrix)

Transforms a 4D vector by the given Matrix.

public static Double4 Transform(Double4 vector, Matrix transform)

Parameters

vector Double4

The source vector.

transform Matrix

The transformation Matrix.

Returns

Double4

The transformed Double4.

Transform(Double4, Quaternion)

Transforms a 4D vector by the given Quaternion rotation.

public static Double4 Transform(Double4 vector, Quaternion rotation)

Parameters

vector Double4

The vector to rotate.

rotation Quaternion

The Quaternion rotation to apply.

Returns

Double4

The transformed Double4.

Transform(ref Double4, ref Matrix, out Double4)

Transforms a 4D vector by the given Matrix.

public static void Transform(ref Double4 vector, ref Matrix transform, out Double4 result)

Parameters

vector Double4

The source vector.

transform Matrix

The transformation Matrix.

result Double4

When the method completes, contains the transformed Double4.

Transform(ref Double4, ref Quaternion, out Double4)

Transforms a 4D vector by the given Quaternion rotation.

public static void Transform(ref Double4 vector, ref Quaternion rotation, out Double4 result)

Parameters

vector Double4

The vector to rotate.

rotation Quaternion

The Quaternion rotation to apply.

result Double4

When the method completes, contains the transformed Double4.

Transform(Double4[], ref Matrix, Double4[])

Transforms an array of 4D vectors by the given Matrix.

public static void Transform(Double4[] source, ref Matrix transform, Double4[] destination)

Parameters

source Double4[]

The array of vectors to transform.

transform Matrix

The 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 or destination is null.

ArgumentOutOfRangeException

Thrown when destination is shorter in length than source.

Transform(Double4[], ref Quaternion, Double4[])

Transforms an array of vectors by the given Quaternion rotation.

public static void Transform(Double4[] source, ref Quaternion rotation, Double4[] destination)

Parameters

source Double4[]

The array of vectors to transform.

rotation Quaternion

The 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 or destination is null.

ArgumentOutOfRangeException

Thrown when destination is shorter in length than source.

Operators

operator +(Double4, Double4)

Adds two vectors.

public static Double4 operator +(Double4 left, Double4 right)

Parameters

left Double4

The first vector to add.

right Double4

The second vector to add.

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

value Double4

The vector to scale.

by Double4

The by.

Returns

Double4

The scaled vector.

operator /(Double4, double)

Scales a vector by the given value.

public static Double4 operator /(Double4 value, double scale)

Parameters

value Double4

The vector to scale.

scale double

The amount by which to scale the vector.

Returns

Double4

The scaled vector.

operator /(double, Double4)

Divides a numerator by a vector.

public static Double4 operator /(double numerator, Double4 value)

Parameters

numerator double

The numerator.

value Double4

The value.

Returns

Double4

The scaled vector.

operator ==(Double4, Double4)

Tests for equality between two objects.

public static bool operator ==(Double4 left, Double4 right)

Parameters

left Double4

The first value to compare.

right Double4

The second value to compare.

Returns

bool

true if left has the same value as right; otherwise, false.

explicit operator Double2(Double4)

Performs an explicit conversion from Double4 to Double2.

public static explicit operator Double2(Double4 value)

Parameters

value Double4

The value.

Returns

Double2

The result of the conversion.

explicit operator Double3(Double4)

Performs an explicit conversion from Double4 to Double3.

public static explicit operator Double3(Double4 value)

Parameters

value Double4

The value.

Returns

Double3

The result of the conversion.

explicit operator Half4(Double4)

Performs an explicit conversion from Double4 to Half4.

public static explicit operator Half4(Double4 value)

Parameters

value Double4

The value.

Returns

Half4

The result of the conversion.

explicit operator Vector4(Double4)

Performs an explicit conversion from Double4 to Vector4.

public static explicit operator Vector4(Double4 value)

Parameters

value Double4

The value.

Returns

Vector4

The result of the conversion.

explicit operator Double4(Half4)

Performs an explicit conversion from Half4 to Double4.

public static explicit operator Double4(Half4 value)

Parameters

value Half4

The value.

Returns

Double4

The result of the conversion.

implicit operator Double4(Vector4)

Performs an implicit conversion from Vector4 to Double4.

public static implicit operator Double4(Vector4 value)

Parameters

value Vector4

The 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

left Double4

The first value to compare.

right Double4

The second value to compare.

Returns

bool

true if left has 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

left Double4

The first vector to multiply.

right Double4

The second vector to multiply.

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

value Double4

The vector to scale.

scale double

The amount by which to scale the vector.

Returns

Double4

The scaled vector.

operator *(double, Double4)

Scales a vector by the given value.

public static Double4 operator *(double scale, Double4 value)

Parameters

scale double

The amount by which to scale the vector.

value Double4

The vector to scale.

Returns

Double4

The scaled vector.

operator -(Double4, Double4)

Subtracts two vectors.

public static Double4 operator -(Double4 left, Double4 right)

Parameters

left Double4

The first vector to subtract.

right Double4

The second vector to subtract.

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 Double4

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

value Double4

The vector to assert (unchange).

Returns

Double4

The asserted (unchanged) vector.