struct Vector4
in global :: System . Numerics
Represents a vector with four single-precision floating-point values.
public Vector4( Vector2 value, float z, float w )
Creates a new object from the specified object and a Z and a W component.
valueThe vector to use for the X and Y components.zThe Z component.wThe W component.
public Vector4( Vector3 value, float w )
Constructs a new object from the specified object and a W component.
valueThe vector to use for the X, Y, and Z components.wThe W component.
public Vector4( float value )
Creates a new object whose four elements have the same value.
valueThe value to assign to all four elements.
public Vector4( float x, float y, float z, float w )
Creates a vector whose elements have the specified values.
xThe value to assign to the field.yThe value to assign to the field.zThe value to assign to the field.wThe value to assign to the field.
public static Vector4 Abs( Vector4 value )
Returns a vector whose elements are the absolute values of each of the specified vector's elements.
valueA vector.- Returns The absolute value vector.
public static Vector4 Add( Vector4 left, Vector4 right )
Adds two vectors together.
leftThe first vector to add.rightThe second vector to add.- Returns The summed vector.
public static Vector4 Clamp( Vector4 value1, Vector4 min, Vector4 max )
Restricts a vector between a minimum and a maximum value.
value1The vector to restrict.minThe minimum value.maxThe maximum value.- Returns The restricted vector.
public void CopyTo( float[] array )
Copies the elements of the vector to a specified array.
arrayThe destination array.
public void CopyTo( float[] array, int index )
Copies the elements of the vector to a specified array starting at a specified index position.
arrayThe destination array.indexThe index at which to copy the first element of the vector.
public static float Distance( Vector4 value1, Vector4 value2 )
Computes the Euclidean distance between the two given points.
value1The first point.value2The second point.- Returns The distance.
public static float DistanceSquared( Vector4 value1, Vector4 value2 )
Returns the Euclidean distance squared between two specified points.
value1The first point.value2The second point.- Returns The distance squared.
public static Vector4 Divide( Vector4 left, Vector4 right )
Divides the first vector by the second.
leftThe first vector.rightThe second vector.- Returns The vector resulting from the division.
public static Vector4 Divide( Vector4 left, float divisor )
Divides the specified vector by a specified scalar value.
leftThe vector.divisorThe scalar value.- Returns The vector that results from the division.
public static float Dot( Vector4 vector1, Vector4 vector2 )
Returns the dot product of two vectors.
vector1The first vector.vector2The second vector.- Returns The dot product.
public bool Equals( Vector4 other )
Returns a value that indicates whether this instance and another vector are equal.
otherThe other vector.- Returns if the two vectors are equal; otherwise, .
public bool Equals( object obj )
Returns a value that indicates whether this instance and a specified object are equal.
objThe object to compare with the current instance.- Returns if the current instance and are equal; otherwise, . If is , the method returns .
public static Vector4 Lerp( Vector4 value1, Vector4 value2, float amount )
Performs a linear interpolation between two vectors based on the given weighting.
value1The first vector.value2The second vector.amountA value between 0 and 1 that indicates the weight of .- Returns The interpolated vector.
public static Vector4 Max( Vector4 value1, Vector4 value2 )
Returns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors.
value1The first vector.value2The second vector.- Returns The maximized vector.
public static Vector4 Min( Vector4 value1, Vector4 value2 )
Returns a vector whose elements are the minimum of each of the pairs of elements in two specified vectors.
value1The first vector.value2The second vector.- Returns The minimized vector.
public static Vector4 Multiply( Vector4 left, Vector4 right )
Returns a new vector whose values are the product of each pair of elements in two specified vectors.
leftThe first vector.rightThe second vector.- Returns The element-wise product vector.
public static Vector4 Multiply( Vector4 left, float right )
Multiplies a vector by a specified scalar.
leftThe vector to multiply.rightThe scalar value.- Returns The scaled vector.
public static Vector4 Multiply( float left, Vector4 right )
Multiplies a scalar value by a specified vector.
leftThe scaled value.rightThe vector.- Returns The scaled vector.
public static Vector4 Negate( Vector4 value )
Negates a specified vector.
valueThe vector to negate.- Returns The negated vector.
public static Vector4 Normalize( Vector4 vector )
Returns a vector with the same direction as the specified vector, but with a length of one.
vectorThe vector to normalize.- Returns The normalized vector.
public static Vector4 One { get; }
Gets a vector whose 4 elements are equal to one.
- Returns Returns .
public static Vector4 op_Addition( Vector4 left, Vector4 right )
Adds two vectors together.
leftThe first vector to add.rightThe second vector to add.- Returns The summed vector.
public static Vector4 op_Division( Vector4 left, Vector4 right )
Divides the first vector by the second.
leftThe first vector.rightThe second vector.- Returns The vector that results from dividing by .
public static Vector4 op_Division( Vector4 value1, float value2 )
Divides the specified vector by a specified scalar value.
value1The vector.value2The scalar value.- Returns The result of the division.
public static bool op_Equality( Vector4 left, Vector4 right )
Returns a value that indicates whether each pair of elements in two specified vectors is equal.
leftThe first vector to compare.rightThe second vector to compare.- Returns if and are equal; otherwise, .
public static bool op_Inequality( Vector4 left, Vector4 right )
Returns a value that indicates whether two specified vectors are not equal.
leftThe first vector to compare.rightThe second vector to compare.- Returns if and are not equal; otherwise, .
public static Vector4 op_Multiply( Vector4 left, Vector4 right )
Returns a new vector whose values are the product of each pair of elements in two specified vectors.
leftThe first vector.rightThe second vector.- Returns The element-wise product vector.
public static Vector4 op_Multiply( Vector4 left, float right )
Multiples the specified vector by the specified scalar value.
leftThe vector.rightThe scalar value.- Returns The scaled vector.
public static Vector4 op_Multiply( float left, Vector4 right )
Multiples the scalar value by the specified vector.
leftThe vector.rightThe scalar value.- Returns The scaled vector.
public static Vector4 op_Subtraction( Vector4 left, Vector4 right )
Subtracts the second vector from the first.
leftThe first vector.rightThe second vector.- Returns The vector that results from subtracting from .
public static Vector4 op_UnaryNegation( Vector4 value )
Negates the specified vector.
valueThe vector to negate.- Returns The negated vector.
public static Vector4 SquareRoot( Vector4 value )
Returns a vector whose elements are the square root of each of a specified vector's elements.
valueA vector.- Returns The square root vector.
public static Vector4 Subtract( Vector4 left, Vector4 right )
Subtracts the second vector from the first.
leftThe first vector.rightThe second vector.- Returns The difference vector.
public string ToString( string format )
Returns the string representation of the current instance using the specified format string to format individual elements.
formatA standard or custom numeric format string that defines the format of individual elements.- Returns The string representation of the current instance.
public string ToString( string format, IFormatProvider formatProvider )
Returns the string representation of the current instance using the specified format string to format individual elements and the specified format provider to define culture-specific formatting.
formatA standard or custom numeric format string that defines the format of individual elements.formatProviderA format provider that supplies culture-specific formatting information.- Returns The string representation of the current instance.
public static Vector4 Transform( Vector2 position, Matrix4x4 matrix )
Transforms a two-dimensional vector by a specified 4x4 matrix.
positionThe vector to transform.matrixThe transformation matrix.- Returns The transformed vector.
public static Vector4 Transform( Vector2 value, Quaternion rotation )
Transforms a two-dimensional vector by the specified Quaternion rotation value.
valueThe vector to rotate.rotationThe rotation to apply.- Returns The transformed vector.
public static Vector4 Transform( Vector3 position, Matrix4x4 matrix )
Transforms a three-dimensional vector by a specified 4x4 matrix.
positionThe vector to transform.matrixThe transformation matrix.- Returns The transformed vector.
public static Vector4 Transform( Vector3 value, Quaternion rotation )
Transforms a three-dimensional vector by the specified Quaternion rotation value.
valueThe vector to rotate.rotationThe rotation to apply.- Returns The transformed vector.
public static Vector4 Transform( Vector4 vector, Matrix4x4 matrix )
Transforms a four-dimensional vector by a specified 4x4 matrix.
vectorThe vector to transform.matrixThe transformation matrix.- Returns The transformed vector.
public static Vector4 Transform( Vector4 value, Quaternion rotation )
Transforms a four-dimensional vector by the specified Quaternion rotation value.
valueThe vector to rotate.rotationThe rotation to apply.- Returns The transformed vector.
public static Vector4 UnitW { get; }
Gets the vector (0,0,0,1).
- Returns The vector (0,0,0,1).
public static Vector4 UnitX { get; }
Gets the vector (1,0,0,0).
- Returns The vector (1,0,0,0).
public static Vector4 UnitY { get; }
Gets the vector (0,1,0,0).
- Returns The vector (0,1,0,0).
public static Vector4 UnitZ { get; }
Gets the vector (0,0,1,0).
- Returns The vector (0,0,1,0).
public float W
The W component of the vector.
public float X
The X component of the vector.
public float Y
The Y component of the vector.
public float Z
The Z component of the vector.
public static Vector4 Zero { get; }
Gets a vector whose 4 elements are equal to zero.
- Returns A vector whose four elements are equal to zero (that is, it returns the vector (0,0,0,0).
public static Vector4 Sin( Vector4 vector )
😔 No documentation found.
public static ValueTuple<Vector4,Vector4> SinCos( Vector4 vector )
😔 No documentation found.
public static Vector4 Round( Vector4 vector, MidpointRounding mode )
😔 No documentation found.
public void CopyTo( Span<float> destination )
😔 No documentation found.
public bool TryCopyTo( Span<float> destination )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public float LengthSquared( )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public Vector4( ReadOnlySpan<float> values )
😔 No documentation found.
public static Vector4 Truncate( Vector4 vector )
😔 No documentation found.
public float Length( )
😔 No documentation found.
public static Vector4 MaxMagnitude( Vector4 value1, Vector4 value2 )
😔 No documentation found.
public static Vector4 E { get; }
😔 No documentation found.
public static Vector4 Epsilon { get; }
😔 No documentation found.
public static Vector4 NaN { get; }
😔 No documentation found.
public static Vector4 NegativeInfinity { get; }
😔 No documentation found.
public static Vector4 NegativeZero { get; }
😔 No documentation found.
public static Vector4 Pi { get; }
😔 No documentation found.
public static Vector4 PositiveInfinity { get; }
😔 No documentation found.
public static Vector4 Tau { get; }
😔 No documentation found.
public float Item { get; set; }
😔 No documentation found.
public static Vector4 ClampNative( Vector4 value1, Vector4 min, Vector4 max )
😔 No documentation found.
public static Vector4 CopySign( Vector4 value, Vector4 sign )
😔 No documentation found.
public static Vector4 Cos( Vector4 vector )
😔 No documentation found.
public static Vector4 Create( float value )
😔 No documentation found.
public static Vector4 Create( Vector2 vector, float z, float w )
😔 No documentation found.
public static Vector4 Create( Vector3 vector, float w )
😔 No documentation found.
public static Vector4 Create( float x, float y, float z, float w )
😔 No documentation found.
public static Vector4 Create( ReadOnlySpan<float> values )
😔 No documentation found.
public static Vector4 RadiansToDegrees( Vector4 radians )
😔 No documentation found.
public static Vector4 MultiplyAddEstimate( Vector4 left, Vector4 right, Vector4 addend )
😔 No documentation found.
public static Vector4 MinNumber( Vector4 value1, Vector4 value2 )
😔 No documentation found.
public static Vector4 MinNative( Vector4 value1, Vector4 value2 )
😔 No documentation found.
public static Vector4 MinMagnitudeNumber( Vector4 value1, Vector4 value2 )
😔 No documentation found.
public static Vector4 MinMagnitude( Vector4 value1, Vector4 value2 )
😔 No documentation found.
public static Vector4 MaxNumber( Vector4 value1, Vector4 value2 )
😔 No documentation found.
public static Vector4 Round( Vector4 vector )
😔 No documentation found.
public static Vector4 MaxNative( Vector4 value1, Vector4 value2 )
😔 No documentation found.
public static Vector4 Log2( Vector4 vector )
😔 No documentation found.
public static Vector4 Log( Vector4 vector )
😔 No documentation found.
public static Vector4 Lerp( Vector4 value1, Vector4 value2, Vector4 amount )
😔 No documentation found.
public static Vector4 Hypot( Vector4 x, Vector4 y )
😔 No documentation found.
public static Vector4 FusedMultiplyAdd( Vector4 left, Vector4 right, Vector4 addend )
😔 No documentation found.
public static Vector4 Exp( Vector4 vector )
😔 No documentation found.
public static Vector4 MaxMagnitudeNumber( Vector4 value1, Vector4 value2 )
😔 No documentation found.
public static Vector4 DegreesToRadians( Vector4 degrees )
😔 No documentation found.