Class Double4
Represents a four dimensional mathematical vector with 32-bit precision (per-component).
Inheritance
Implements
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public sealed class Double4 : ValueType, IEquatable<Double4>, IFormattable
Constructors
Double4(Double2, Double2)
Initializes a new instance of the Double4 struct.
Declaration
public Double4(Double2 xy, Double2 zw)
Parameters
Double2
xy
A vector containing the values with which to initialize the X and Y components. |
Double2
zw
A vector containing the values with which to initialize the Z and W components. |
Double4(Double2, Double, Double)
Initializes a new instance of the Double4 struct.
Declaration
public Double4(Double2 value, double z, double w)
Parameters
Double2
value
A vector containing the values with which to initialize the X and Y components. |
System.Double
z
Initial value for the Z component of the vector. |
System.Double
w
Initial value for the W component of the vector. |
Double4(Double3, Double)
Initializes a new instance of the Double4 struct.
Declaration
public Double4(Double3 value, double w)
Parameters
Double3
value
A vector containing the values with which to initialize the X, Y, and Z components. |
System.Double
w
Initial value for the W component of the vector. |
Double4(Vector4)
Initializes a new instance of the Double4 struct.
Declaration
public Double4(Vector4 value)
Parameters
Vector4
value
A vector containing the values with which to initialize the X, Y, Z, and W components. |
Double4(Double)
Initializes a new instance of the Double4 struct.
Declaration
public Double4(double value)
Parameters
System.Double
value
The value that will be assigned to all components. |
Double4(Double, Double, Double, Double)
Initializes a new instance of the Double4 struct.
Declaration
public Double4(double x, double y, double z, double w)
Parameters
System.Double
x
Initial value for the X component of the vector. |
System.Double
y
Initial value for the Y component of the vector. |
System.Double
z
Initial value for the Z component of the vector. |
System.Double
w
Initial value for the W component of the vector. |
Double4(Double[])
Initializes a new instance of the Double4 struct.
Declaration
public Double4(double[] values)
Parameters
System.Double[]
values
The values to assign to the X, Y, Z, and W components of the vector. This must be an array with four elements. |
Exceptions
System.ArgumentNullException
Thrown when |
System.ArgumentOutOfRangeException
Thrown when |
Fields
Half
A Double4 with all of its components set to half.
Declaration
public static readonly Double4 Half
Field Value
Double4
|
Maximum
A Double4 with all components equal to System.Double.MaxValue.
Declaration
public static readonly Double4 Maximum
Field Value
Double4
|
Minimum
A Double4 with all components equal to System.Double.MinValue.
Declaration
public static readonly Double4 Minimum
Field Value
Double4
|
One
A Double4 with all of its components set to one.
Declaration
public static readonly Double4 One
Field Value
Double4
|
SizeInBytes
The size of the Double4 type, in bytes.
Declaration
public static readonly int SizeInBytes
Field Value
System.Int32
|
UnitW
The W unit Double4 (0, 0, 0, 1).
Declaration
public static readonly Double4 UnitW
Field Value
Double4
|
UnitX
The X unit Double4 (1, 0, 0, 0).
Declaration
public static readonly Double4 UnitX
Field Value
Double4
|
UnitY
The Y unit Double4 (0, 1, 0, 0).
Declaration
public static readonly Double4 UnitY
Field Value
Double4
|
UnitZ
The Z unit Double4 (0, 0, 1, 0).
Declaration
public static readonly Double4 UnitZ
Field Value
Double4
|
W
The W component.
Declaration
public double W
Field Value
System.Double
|
X
The X component.
Declaration
public double X
Field Value
System.Double
|
Y
The Y component.
Declaration
public double Y
Field Value
System.Double
|
Z
The Z component.
Declaration
public double Z
Field Value
System.Double
|
Zero
A Double4 with all of its components set to zero.
Declaration
public static readonly Double4 Zero
Field Value
Double4
|
Properties
Absolute
Gets a vector with values being absolute values of that vector.
Declaration
public Double4 Absolute { get; }
Property Value
Double4
|
AvgValue
Gets an arithmetic average value of all vector components.
Declaration
public double AvgValue { get; }
Property Value
System.Double
|
Default
IsNormalized
Gets a value indicting whether this instance is normalized.
Declaration
public bool IsNormalized { get; }
Property Value
System.Boolean
|
IsOne
Gets a value indicting whether this vector is one
Declaration
public bool IsOne { get; }
Property Value
System.Boolean
|
IsZero
Gets a value indicting whether this vector is zero
Declaration
public bool IsZero { get; }
Property Value
System.Boolean
|
Item[Int32]
Gets or sets the component at the specified index.
Declaration
public double this[int index] { get; set; }
Parameters
System.Int32
index
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
System.Double
The value of the X, Y, Z, or W component, depending on the index. |
Exceptions
System.ArgumentOutOfRangeException
Thrown when the |
Length
Calculates the length of the vector.
Declaration
public double Length { get; }
Property Value
System.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.
Declaration
public double LengthSquared { get; }
Property Value
System.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.
MaxValue
Gets a maximum component value
Declaration
public double MaxValue { get; }
Property Value
System.Double
|
MinValue
Gets a minimum component value
Declaration
public double MinValue { get; }
Property Value
System.Double
|
Negative
Gets a vector with values being opposite to values of that vector.
Declaration
public Double4 Negative { get; }
Property Value
Double4
|
ValuesSum
Gets a sum of the component values.
Declaration
public double ValuesSum { get; }
Property Value
System.Double
|
Methods
Abs(Double4)
Returns the absolute value of a vector.
Declaration
public static Double4 Abs(Double4 v)
Parameters
Double4
v
The value. |
Returns
Double4
A vector which components are less or equal to 0. |
Add(Double4, Double4)
Adds two vectors.
Declaration
public static Double4 Add(Double4 left, Double4 right)
Parameters
Double4
left
The first vector to add. |
Double4
right
The second vector to add. |
Returns
Double4
The sum of the two vectors. |
Add(Double4, Double)
Performs a component-wise addition.
Declaration
public static Double4 Add(Double4 left, double right)
Parameters
Double4
left
The input vector |
System.Double
right
The scalar value to be added to elements |
Returns
Double4
The vector with added scalar for each element. |
Add(ref Double4, ref Double4, out Double4)
Adds two vectors.
Declaration
public static void Add(ref Double4 left, ref Double4 right, out Double4 result)
Parameters
Double4
left
The first vector to add. |
Double4
right
The second vector to add. |
Double4
result
When the method completes, contains the sum of the two vectors. |
Add(ref Double4, ref Double, out Double4)
Performs a component-wise addition.
Declaration
public static void Add(ref Double4 left, ref double right, out Double4 result)
Parameters
Double4
left
The input vector |
System.Double
right
The scalar value to be added to elements |
Double4
result
The vector with added scalar for each element. |
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.
Declaration
public static Double4 Barycentric(Double4 value1, Double4 value2, Double4 value3, double amount1, double amount2)
Parameters
Double4
value1
A Double4 containing the 4D Cartesian coordinates of vertex 1 of the triangle. |
Double4
value2
A Double4 containing the 4D Cartesian coordinates of vertex 2 of the triangle. |
Double4
value3
A Double4 containing the 4D Cartesian coordinates of vertex 3 of the triangle. |
System.Double
amount1
Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in |
System.Double
amount2
Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in |
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.
Declaration
public static void Barycentric(ref Double4 value1, ref Double4 value2, ref Double4 value3, double amount1, double amount2, out Double4 result)
Parameters
Double4
value1
A Double4 containing the 4D Cartesian coordinates of vertex 1 of the triangle. |
Double4
value2
A Double4 containing the 4D Cartesian coordinates of vertex 2 of the triangle. |
Double4
value3
A Double4 containing the 4D Cartesian coordinates of vertex 3 of the triangle. |
System.Double
amount1
Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in |
System.Double
amount2
Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in |
Double4
result
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.
Declaration
public static Double4 CatmullRom(Double4 value1, Double4 value2, Double4 value3, Double4 value4, double amount)
Parameters
Double4
value1
The first position in the interpolation. |
Double4
value2
The second position in the interpolation. |
Double4
value3
The third position in the interpolation. |
Double4
value4
The fourth position in the interpolation. |
System.Double
amount
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.
Declaration
public static void CatmullRom(ref Double4 value1, ref Double4 value2, ref Double4 value3, ref Double4 value4, double amount, out Double4 result)
Parameters
Double4
value1
The first position in the interpolation. |
Double4
value2
The second position in the interpolation. |
Double4
value3
The third position in the interpolation. |
Double4
value4
The fourth position in the interpolation. |
System.Double
amount
Weighting factor. |
Double4
result
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.
Declaration
public static Double4 Clamp(Double4 value, Double4 min, Double4 max)
Parameters
Double4
value
The value to clamp. |
Double4
min
The minimum value. |
Double4
max
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.
Declaration
public static void Clamp(ref Double4 value, ref Double4 min, ref Double4 max, out Double4 result)
Parameters
Double4
value
The value to clamp. |
Double4
min
The minimum value. |
Double4
max
The maximum value. |
Double4
result
When the method completes, contains the clamped value. |
ClampLength(Double4, Double)
Makes sure that Length of the output vector is always below max and above 0.
Declaration
public static Double4 ClampLength(Double4 vector, double max)
Parameters
Double4
vector
Input Vector. |
System.Double
max
Max Length |
Returns
Double4
|
ClampLength(Double4, Double, Double)
Makes sure that Length of the output vector is always below max and above min.
Declaration
public static Double4 ClampLength(Double4 vector, double min, double max)
Parameters
Double4
vector
Input Vector. |
System.Double
min
Min Length |
System.Double
max
Max Length |
Returns
Double4
|
ClampLength(Double4, Double, Double, out Double4)
Makes sure that Length of the output vector is always below max and above min.
Declaration
public static void ClampLength(Double4 vector, double min, double max, out Double4 result)
Parameters
Double4
vector
Input Vector. |
System.Double
min
Min Length |
System.Double
max
Max Length |
Double4
result
The result vector. |
Distance(Double4, Double4)
Calculates the distance between two vectors.
Declaration
public static double Distance(Double4 value1, Double4 value2)
Parameters
Double4
value1
The first vector. |
Double4
value2
The second vector. |
Returns
System.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.
Declaration
public static void Distance(ref Double4 value1, ref Double4 value2, out double result)
Parameters
Double4
value1
The first vector. |
Double4
value2
The second vector. |
System.Double
result
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.
Declaration
public static double DistanceSquared(Double4 value1, Double4 value2)
Parameters
Double4
value1
The first vector. |
Double4
value2
The second vector. |
Returns
System.Double
The squared distance between the two vectors. |
DistanceSquared(ref Double4, ref Double4, out Double)
Calculates the squared distance between two vectors.
Declaration
public static void DistanceSquared(ref Double4 value1, ref Double4 value2, out double result)
Parameters
Double4
value1
The first vector. |
Double4
value2
The second vector. |
System.Double
result
When the method completes, contains the squared distance between the two vectors. |
Divide(Double4, Double)
Scales a vector by the given value.
Declaration
public static Double4 Divide(Double4 value, double scale)
Parameters
Double4
value
The vector to scale. |
System.Double
scale
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.
Declaration
public static void Divide(ref Double4 value, double scale, out Double4 result)
Parameters
Double4
value
The vector to scale. |
System.Double
scale
The amount by which to scale the vector. |
Double4
result
When the method completes, contains the scaled vector. |
Divide(Double, Double4)
Scales a vector by the given value.
Declaration
public static Double4 Divide(double scale, Double4 value)
Parameters
System.Double
scale
The amount by which to scale the vector. |
Double4
value
The vector to scale. |
Returns
Double4
The scaled vector. |
Divide(Double, ref Double4, out Double4)
Scales a vector by the given value.
Declaration
public static void Divide(double scale, ref Double4 value, out Double4 result)
Parameters
System.Double
scale
The amount by which to scale the vector. |
Double4
value
The vector to scale. |
Double4
result
When the method completes, contains the scaled vector. |
Dot(Double4, Double4)
Calculates the dot product of two vectors.
Declaration
public static double Dot(Double4 left, Double4 right)
Parameters
Double4
left
First source vector. |
Double4
right
Second source vector. |
Returns
System.Double
The dot product of the two vectors. |
Dot(ref Double4, ref Double4, out Double)
Calculates the dot product of two vectors.
Declaration
public static void Dot(ref Double4 left, ref Double4 right, out double result)
Parameters
Double4
left
First source vector |
Double4
right
Second source vector. |
System.Double
result
When the method completes, contains the dot product of the two vectors. |
Equals(Double4)
Determines whether the specified Double4 is equal to this instance.
Declaration
public bool Equals(Double4 other)
Parameters
Double4
other
The Double4 to compare with this instance. |
Returns
System.Boolean
|
Equals(ref Double4)
Determines whether the specified Double4 is equal to this instance.
Declaration
public bool Equals(ref Double4 other)
Parameters
Double4
other
The Double4 to compare with this instance. |
Returns
System.Boolean
|
Equals(Object)
Determines whether the specified System.Object is equal to this instance.
Declaration
public override bool Equals(object value)
Parameters
System.Object
value
The System.Object to compare with this instance. |
Returns
System.Boolean
|
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
System.Int32
|
Hermite(Double4, Double4, Double4, Double4, Double)
Performs a Hermite spline interpolation.
Declaration
public static Double4 Hermite(Double4 value1, Double4 tangent1, Double4 value2, Double4 tangent2, double amount)
Parameters
Double4
value1
First source position vector. |
Double4
tangent1
First source tangent vector. |
Double4
value2
Second source position vector. |
Double4
tangent2
Second source tangent vector. |
System.Double
amount
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.
Declaration
public static void Hermite(ref Double4 value1, ref Double4 tangent1, ref Double4 value2, ref Double4 tangent2, double amount, out Double4 result)
Parameters
Double4
value1
First source position vector. |
Double4
tangent1
First source tangent vector. |
Double4
value2
Second source position vector. |
Double4
tangent2
Second source tangent vector. |
System.Double
amount
Weighting factor. |
Double4
result
When the method completes, contains the result of the Hermite spline interpolation. |
Lerp(Double4, Double4, Double)
Performs a linear interpolation between two vectors.
Declaration
public static Double4 Lerp(Double4 start, Double4 end, double amount)
Parameters
Double4
start
Start vector. |
Double4
end
End vector. |
System.Double
amount
Value between 0 and 1 indicating the weight of |
Returns
Double4
The linear interpolation of the two vectors. |
Remarks
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.
Declaration
public static void Lerp(ref Double4 start, ref Double4 end, double amount, out Double4 result)
Parameters
Double4
start
Start vector. |
Double4
end
End vector. |
System.Double
amount
Value between 0 and 1 indicating the weight of |
Double4
result
When the method completes, contains the linear interpolation of the two vectors. |
Remarks
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.
Declaration
public static Double4 Max(Double4 left, Double4 right)
Parameters
Double4
left
The first source vector. |
Double4
right
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 largest components of the specified vectors.
Declaration
public static void Max(ref Double4 left, ref Double4 right, out Double4 result)
Parameters
Double4
left
The first source vector. |
Double4
right
The second source vector. |
Double4
result
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.
Declaration
public static Double4 Min(Double4 left, Double4 right)
Parameters
Double4
left
The first source vector. |
Double4
right
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.
Declaration
public static void Min(ref Double4 left, ref Double4 right, out Double4 result)
Parameters
Double4
left
The first source vector. |
Double4
right
The second source vector. |
Double4
result
When the method completes, contains an new vector composed of the smallest components of the source vectors. |
Multiply(Double4, Double4)
Multiplies a vector with another by performing component-wise multiplication.
Declaration
public static Double4 Multiply(Double4 left, Double4 right)
Parameters
Double4
left
The first vector to multiply. |
Double4
right
The second vector to multiply. |
Returns
Double4
The multiplied vector. |
Multiply(Double4, Double)
Scales a vector by the given value.
Declaration
public static Double4 Multiply(Double4 value, double scale)
Parameters
Double4
value
The vector to scale. |
System.Double
scale
The amount by which to scale the vector. |
Returns
Double4
The scaled vector. |
Multiply(ref Double4, ref Double4, out Double4)
Multiplies a vector with another by performing component-wise multiplication.
Declaration
public static void Multiply(ref Double4 left, ref Double4 right, out Double4 result)
Parameters
Double4
left
The first vector to multiply. |
Double4
right
The second vector to multiply. |
Double4
result
When the method completes, contains the multiplied vector. |
Multiply(ref Double4, Double, out Double4)
Scales a vector by the given value.
Declaration
public static void Multiply(ref Double4 value, double scale, out Double4 result)
Parameters
Double4
value
The vector to scale. |
System.Double
scale
The amount by which to scale the vector. |
Double4
result
When the method completes, contains the scaled vector. |
NearEqual(Double4, Double4, Double)
Tests whether one vector is near another vector.
Declaration
public static bool NearEqual(Double4 left, Double4 right, double epsilon = 1E-16)
Parameters
Double4
left
The left vector. |
Double4
right
The right vector. |
System.Double
epsilon
The epsilon. |
Returns
System.Boolean
|
NearEqual(ref Double4, ref Double4, Double)
Tests whether one vector is near another vector.
Declaration
public static bool NearEqual(ref Double4 left, ref Double4 right, double epsilon = 1E-16)
Parameters
Double4
left
The left vector. |
Double4
right
The right vector. |
System.Double
epsilon
The epsilon. |
Returns
System.Boolean
|
Negate(Double4)
Reverses the direction of a given vector.
Declaration
public static Double4 Negate(Double4 value)
Parameters
Double4
value
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.
Declaration
public static void Negate(ref Double4 value, out Double4 result)
Parameters
Double4
value
The vector to negate. |
Double4
result
When the method completes, contains a vector facing in the opposite direction. |
Normalize()
Converts the vector into a unit vector.
Declaration
public void Normalize()
Normalize(Double4)
Converts the vector into a unit vector.
Declaration
public static Double4 Normalize(Double4 value)
Parameters
Double4
value
The vector to normalize. |
Returns
Double4
The normalized vector. |
Normalize(ref Double4, out Double4)
Converts the vector into a unit vector.
Declaration
public static void Normalize(ref Double4 value, out Double4 result)
Parameters
Double4
value
The vector to normalize. |
Double4
result
When the method completes, contains the normalized vector. |
SmoothStep(Double4, Double4, Double)
Performs a cubic interpolation between two vectors.
Declaration
public static Double4 SmoothStep(Double4 start, Double4 end, double amount)
Parameters
Double4
start
Start vector. |
Double4
end
End vector. |
System.Double
amount
Value between 0 and 1 indicating the weight of |
Returns
Double4
The cubic interpolation of the two vectors. |
SmoothStep(ref Double4, ref Double4, Double, out Double4)
Performs a cubic interpolation between two vectors.
Declaration
public static void SmoothStep(ref Double4 start, ref Double4 end, double amount, out Double4 result)
Parameters
Double4
start
Start vector. |
Double4
end
End vector. |
System.Double
amount
Value between 0 and 1 indicating the weight of |
Double4
result
When the method completes, contains the cubic interpolation of the two vectors. |
Subtract(Double4, Double4)
Subtracts two vectors.
Declaration
public static Double4 Subtract(Double4 left, Double4 right)
Parameters
Double4
left
The first vector to subtract. |
Double4
right
The second vector to subtract. |
Returns
Double4
The difference of the two vectors. |
Subtract(Double4, Double)
Performs a component-wise subtraction.
Declaration
public static Double4 Subtract(Double4 left, double right)
Parameters
Double4
left
The input vector |
System.Double
right
The scalar value to be subtracted from elements |
Returns
Double4
The vector with subtracted scalar for each element. |
Subtract(ref Double4, ref Double4, out Double4)
Subtracts two vectors.
Declaration
public static void Subtract(ref Double4 left, ref Double4 right, out Double4 result)
Parameters
Double4
left
The first vector to subtract. |
Double4
right
The second vector to subtract. |
Double4
result
When the method completes, contains the difference of the two vectors. |
Subtract(ref Double4, ref Double, out Double4)
Performs a component-wise subtraction.
Declaration
public static void Subtract(ref Double4 left, ref double right, out Double4 result)
Parameters
Double4
left
The input vector |
System.Double
right
The scalar value to be subtracted from elements |
Double4
result
The vector with subtracted scalar for each element. |
Subtract(Double, Double4)
Performs a component-wise subtraction.
Declaration
public static Double4 Subtract(double left, Double4 right)
Parameters
System.Double
left
The scalar value to be subtracted from elements |
Double4
right
The input vector. |
Returns
Double4
The vector with subtracted scalar for each element. |
Subtract(ref Double, ref Double4, out Double4)
Performs a component-wise subtraction.
Declaration
public static void Subtract(ref double left, ref Double4 right, out Double4 result)
Parameters
System.Double
left
The scalar value to be subtracted from elements |
Double4
right
The input vector. |
Double4
result
The vector with subtracted scalar for each element. |
ToArray()
Creates an array containing the elements of the vector.
Declaration
public double[] ToArray()
Returns
System.Double[]
A four-element array containing the components of the vector. |
ToString()
Returns a System.String that represents this instance.
Declaration
public override string ToString()
Returns
System.String
A System.String that represents this instance. |
ToString(IFormatProvider)
Returns a System.String that represents this instance.
Declaration
public string ToString(IFormatProvider formatProvider)
Parameters
System.IFormatProvider
formatProvider
The format provider. |
Returns
System.String
A System.String that represents this instance. |
ToString(String)
Returns a System.String that represents this instance.
Declaration
public string ToString(string format)
Parameters
System.String
format
The format. |
Returns
System.String
A System.String that represents this instance. |
ToString(String, IFormatProvider)
Returns a System.String that represents this instance.
Declaration
public string ToString(string format, IFormatProvider formatProvider)
Parameters
System.String
format
The format. |
System.IFormatProvider
formatProvider
The format provider. |
Returns
System.String
A System.String that represents this instance. |
Transform(Double4, Matrix)
Transforms a 4D vector by the given Matrix.
Declaration
public static Double4 Transform(Double4 vector, Matrix transform)
Parameters
Double4
vector
The source vector. |
Matrix
transform
The transformation Matrix. |
Returns
Double4
The transformed Double4. |
Transform(Double4, Quaternion)
Transforms a 4D vector by the given Quaternion rotation.
Declaration
public static Double4 Transform(Double4 vector, Quaternion rotation)
Parameters
Double4
vector
The vector to rotate. |
Quaternion
rotation
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.
Declaration
public static void Transform(ref Double4 vector, ref Matrix transform, out Double4 result)
Parameters
Double4
vector
The source vector. |
Matrix
transform
The transformation Matrix. |
Double4
result
When the method completes, contains the transformed Double4. |
Transform(ref Double4, ref Quaternion, out Double4)
Transforms a 4D vector by the given Quaternion rotation.
Declaration
public static void Transform(ref Double4 vector, ref Quaternion rotation, out Double4 result)
Parameters
Double4
vector
The vector to rotate. |
Quaternion
rotation
The Quaternion rotation to apply. |
Double4
result
When the method completes, contains the transformed Double4. |
Operators
Addition(Double4, Double4)
Adds two vectors.
Declaration
public static Double4 operator +(Double4 left, Double4 right)
Parameters
Double4
left
The first vector to add. |
Double4
right
The second vector to add. |
Returns
Double4
The sum of the two vectors. |
Addition(Double4, Double)
Performs a component-wise addition.
Declaration
public static Double4 operator +(Double4 value, double scalar)
Parameters
Double4
value
The input vector. |
System.Double
scalar
The scalar value to be added on elements |
Returns
Double4
The vector with added scalar for each element. |
Addition(Double, Double4)
Performs a component-wise addition.
Declaration
public static Double4 operator +(double scalar, Double4 value)
Parameters
System.Double
scalar
The scalar value to be added on elements |
Double4
value
The input vector. |
Returns
Double4
The vector with added scalar for each element. |
Division(Double4, Double4)
Scales a vector by the given value.
Declaration
public static Double4 operator /(Double4 value, Double4 scale)
Parameters
Double4
value
The vector to scale. |
Double4
scale
The amount by which to scale the vector. |
Returns
Double4
The scaled vector. |
Division(Double4, Double)
Scales a vector by the given value.
Declaration
public static Double4 operator /(Double4 value, double scale)
Parameters
Double4
value
The vector to scale. |
System.Double
scale
The amount by which to scale the vector. |
Returns
Double4
The scaled vector. |
Division(Double, Double4)
Scales a vector by the given value.
Declaration
public static Double4 operator /(double scale, Double4 value)
Parameters
System.Double
scale
The amount by which to scale the vector. |
Double4
value
The vector to scale. |
Returns
Double4
The scaled vector. |
Equality(Double4, Double4)
Tests for equality between two objects.
Declaration
public static bool operator ==(Double4 left, Double4 right)
Parameters
Double4
left
The first value to compare. |
Double4
right
The second value to compare. |
Returns
System.Boolean
|
Explicit(Double4 to Double2)
Declaration
public static explicit operator Double2(Double4 value)
Parameters
Double4
value
The value. |
Returns
Double2
The result of the conversion. |
Explicit(Double4 to Double3)
Declaration
public static explicit operator Double3(Double4 value)
Parameters
Double4
value
The value. |
Returns
Double3
The result of the conversion. |
Implicit(Double4 to Float4)
Declaration
public static implicit operator Float4(Double4 value)
Parameters
Double4
value
The value. |
Returns
Float4
The result of the conversion. |
Implicit(Double4 to Vector4)
Declaration
public static implicit operator Vector4(Double4 value)
Parameters
Double4
value
The value. |
Returns
Vector4
The result of the conversion. |
Inequality(Double4, Double4)
Tests for inequality between two objects.
Declaration
public static bool operator !=(Double4 left, Double4 right)
Parameters
Double4
left
The first value to compare. |
Double4
right
The second value to compare. |
Returns
System.Boolean
|
Modulus(Double4, Double4)
Remainder of value divided by scale.
Declaration
public static Double4 operator %(Double4 value, Double4 scale)
Parameters
Double4
value
The vector to scale. |
Double4
scale
The amount by which to scale the vector. |
Returns
Double4
The remained vector. |
Modulus(Double4, Double)
Remainder of value divided by scale.
Declaration
public static Double4 operator %(Double4 value, double scale)
Parameters
Double4
value
The vector to scale. |
System.Double
scale
The amount by which to scale the vector. |
Returns
Double4
The remained vector. |
Modulus(Double, Double4)
Remainder of value divided by scale.
Declaration
public static Double4 operator %(double value, Double4 scale)
Parameters
System.Double
value
The amount by which to scale the vector. |
Double4
scale
The vector to scale. |
Returns
Double4
The remained vector. |
Multiply(Double4, Double4)
Multiplies a vector with another by performing component-wise multiplication equivalent to Multiply(ref Double4, ref Double4, out Double4).
Declaration
public static Double4 operator *(Double4 left, Double4 right)
Parameters
Double4
left
The first vector to multiply. |
Double4
right
The second vector to multiply. |
Returns
Double4
The multiplication of the two vectors. |
Multiply(Double4, Double)
Scales a vector by the given value.
Declaration
public static Double4 operator *(Double4 value, double scale)
Parameters
Double4
value
The vector to scale. |
System.Double
scale
The amount by which to scale the vector. |
Returns
Double4
The scaled vector. |
Multiply(Double, Double4)
Scales a vector by the given value.
Declaration
public static Double4 operator *(double scale, Double4 value)
Parameters
System.Double
scale
The amount by which to scale the vector. |
Double4
value
The vector to scale. |
Returns
Double4
The scaled vector. |
Subtraction(Double4, Double4)
Subtracts two vectors.
Declaration
public static Double4 operator -(Double4 left, Double4 right)
Parameters
Double4
left
The first vector to subtract. |
Double4
right
The second vector to subtract. |
Returns
Double4
The difference of the two vectors. |
Subtraction(Double4, Double)
Performs a component-wise subtraction.
Declaration
public static Double4 operator -(Double4 value, double scalar)
Parameters
Double4
value
The input vector. |
System.Double
scalar
The scalar value to be subtracted from elements |
Returns
Double4
The vector with subtracted scalar from each element. |
Subtraction(Double, Double4)
Performs a component-wise subtraction.
Declaration
public static Double4 operator -(double scalar, Double4 value)
Parameters
System.Double
scalar
The scalar value to be subtracted from elements |
Double4
value
The input vector. |
Returns
Double4
The vector with subtracted scalar from each element. |
UnaryNegation(Double4)
Reverses the direction of a given vector.
Declaration
public static Double4 operator -(Double4 value)
Parameters
Double4
value
The vector to negate. |
Returns
Double4
A vector facing in the opposite direction. |
UnaryPlus(Double4)
Assert a vector (return it unchanged).
Declaration
public static Double4 operator +(Double4 value)
Parameters
Double4
value
The vector to assert (unchanged). |
Returns
Double4
The asserted (unchanged) vector. |