struct Vector3

in global :: System . Numerics

Represents a vector with three single-precision floating-point values.


public Vector3( Vector2 value, float z )

Creates a new object from the specified object and the specified value.

  • value The vector with two elements.
  • z The additional value to assign to the field.

public Vector3( float value )

Creates a new object whose three elements have the same value.

  • value The value to assign to all three elements.

public Vector3( float x, float y, float z )

Creates a vector whose elements have the specified values.

  • x The value to assign to the field.
  • y The value to assign to the field.
  • z The value to assign to the field.

public static Vector3 Abs( Vector3 value )

Returns a vector whose elements are the absolute values of each of the specified vector's elements.

  • value A vector.
  • Returns The absolute value vector.

public static Vector3 Add( Vector3 left, Vector3 right )

Adds two vectors together.

  • left The first vector to add.
  • right The second vector to add.
  • Returns The summed vector.

public static Vector3 Clamp( Vector3 value1, Vector3 min, Vector3 max )

Restricts a vector between a minimum and a maximum value.

  • value1 The vector to restrict.
  • min The minimum value.
  • max The maximum value.
  • Returns The restricted vector.

public void CopyTo( float[] array )

Copies the elements of the vector to a specified array.

  • array The 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.

  • array The destination array.
  • index The index at which to copy the first element of the vector.

public static Vector3 Cross( Vector3 vector1, Vector3 vector2 )

Computes the cross product of two vectors.

  • vector1 The first vector.
  • vector2 The second vector.
  • Returns The cross product.

public static float Distance( Vector3 value1, Vector3 value2 )

Computes the Euclidean distance between the two given points.

  • value1 The first point.
  • value2 The second point.
  • Returns The distance.

public static float DistanceSquared( Vector3 value1, Vector3 value2 )

Returns the Euclidean distance squared between two specified points.

  • value1 The first point.
  • value2 The second point.
  • Returns The distance squared.

public static Vector3 Divide( Vector3 left, Vector3 right )

Divides the first vector by the second.

  • left The first vector.
  • right The second vector.
  • Returns The vector resulting from the division.

public static Vector3 Divide( Vector3 left, float divisor )

Divides the specified vector by a specified scalar value.

  • left The vector.
  • divisor The scalar value.
  • Returns The vector that results from the division.

public static float Dot( Vector3 vector1, Vector3 vector2 )

Returns the dot product of two vectors.

  • vector1 The first vector.
  • vector2 The second vector.
  • Returns The dot product.

public bool Equals( Vector3 other )

Returns a value that indicates whether this instance and another vector are equal.

  • other The 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.

  • obj The object to compare with the current instance.
  • Returns if the current instance and are equal; otherwise, . If is , the method returns .

public static Vector3 Lerp( Vector3 value1, Vector3 value2, float amount )

Performs a linear interpolation between two vectors based on the given weighting.

  • value1 The first vector.
  • value2 The second vector.
  • amount A value between 0 and 1 that indicates the weight of .
  • Returns The interpolated vector.

public static Vector3 Max( Vector3 value1, Vector3 value2 )

Returns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors.

  • value1 The first vector.
  • value2 The second vector.
  • Returns The maximized vector.

public static Vector3 Min( Vector3 value1, Vector3 value2 )

Returns a vector whose elements are the minimum of each of the pairs of elements in two specified vectors.

  • value1 The first vector.
  • value2 The second vector.
  • Returns The minimized vector.

public static Vector3 Multiply( Vector3 left, Vector3 right )

Returns a new vector whose values are the product of each pair of elements in two specified vectors.

  • left The first vector.
  • right The second vector.
  • Returns The element-wise product vector.

public static Vector3 Multiply( Vector3 left, float right )

Multiplies a vector by a specified scalar.

  • left The vector to multiply.
  • right The scalar value.
  • Returns The scaled vector.

public static Vector3 Multiply( float left, Vector3 right )

Multiplies a scalar value by a specified vector.

  • left The scaled value.
  • right The vector.
  • Returns The scaled vector.

public static Vector3 Negate( Vector3 value )

Negates a specified vector.

  • value The vector to negate.
  • Returns The negated vector.

public static Vector3 Normalize( Vector3 value )

Returns a vector with the same direction as the specified vector, but with a length of one.

  • value The vector to normalize.
  • Returns The normalized vector.

public static Vector3 One { get; }

Gets a vector whose 3 elements are equal to one.

  • Returns A vector whose three elements are equal to one (that is, it returns the vector (1,1,1).

public static Vector3 op_Addition( Vector3 left, Vector3 right )

Adds two vectors together.

  • left The first vector to add.
  • right The second vector to add.
  • Returns The summed vector.

public static Vector3 op_Division( Vector3 left, Vector3 right )

Divides the first vector by the second.

  • left The first vector.
  • right The second vector.
  • Returns The vector that results from dividing by .

public static Vector3 op_Division( Vector3 value1, float value2 )

Divides the specified vector by a specified scalar value.

  • value1 The vector.
  • value2 The scalar value.
  • Returns The result of the division.

public static bool op_Equality( Vector3 left, Vector3 right )

Returns a value that indicates whether each pair of elements in two specified vectors is equal.

  • left The first vector to compare.
  • right The second vector to compare.
  • Returns if and are equal; otherwise, .

public static bool op_Inequality( Vector3 left, Vector3 right )

Returns a value that indicates whether two specified vectors are not equal.

  • left The first vector to compare.
  • right The second vector to compare.
  • Returns if and are not equal; otherwise, .

public static Vector3 op_Multiply( Vector3 left, Vector3 right )

Returns a new vector whose values are the product of each pair of elements in two specified vectors.

  • left The first vector.
  • right The second vector.
  • Returns The element-wise product vector.

public static Vector3 op_Multiply( Vector3 left, float right )

Multiples the specified vector by the specified scalar value.

  • left The vector.
  • right The scalar value.
  • Returns The scaled vector.

public static Vector3 op_Multiply( float left, Vector3 right )

Multiples the scalar value by the specified vector.

  • left The vector.
  • right The scalar value.
  • Returns The scaled vector.

public static Vector3 op_Subtraction( Vector3 left, Vector3 right )

Subtracts the second vector from the first.

  • left The first vector.
  • right The second vector.
  • Returns The vector that results from subtracting from .

public static Vector3 op_UnaryNegation( Vector3 value )

Negates the specified vector.

  • value The vector to negate.
  • Returns The negated vector.

public static Vector3 Reflect( Vector3 vector, Vector3 normal )

Returns the reflection of a vector off a surface that has the specified normal.

  • vector The source vector.
  • normal The normal of the surface being reflected off.
  • Returns The reflected vector.

public static Vector3 SquareRoot( Vector3 value )

Returns a vector whose elements are the square root of each of a specified vector's elements.

  • value A vector.
  • Returns The square root vector.

public static Vector3 Subtract( Vector3 left, Vector3 right )

Subtracts the second vector from the first.

  • left The first vector.
  • right The 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.

  • format A 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.

  • format A standard or custom numeric format string that defines the format of individual elements.
  • formatProvider A format provider that supplies culture-specific formatting information.
  • Returns The string representation of the current instance.

public static Vector3 Transform( Vector3 position, Matrix4x4 matrix )

Transforms a vector by a specified 4x4 matrix.

  • position The vector to transform.
  • matrix The transformation matrix.
  • Returns The transformed vector.

public static Vector3 Transform( Vector3 value, Quaternion rotation )

Transforms a vector by the specified Quaternion rotation value.

  • value The vector to rotate.
  • rotation The rotation to apply.
  • Returns The transformed vector.

public static Vector3 TransformNormal( Vector3 normal, Matrix4x4 matrix )

Transforms a vector normal by the given 4x4 matrix.

  • normal The source vector.
  • matrix The matrix.
  • Returns The transformed vector.

public static Vector3 UnitX { get; }

Gets the vector (1,0,0).

  • Returns The vector (1,0,0).

public static Vector3 UnitY { get; }

Gets the vector (0,1,0).

  • Returns The vector (0,1,0).

public static Vector3 UnitZ { get; }

Gets the vector (0,0,1).

  • Returns The vector (0,0,1).

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 Vector3 Zero { get; }

Gets a vector whose 3 elements are equal to zero.

  • Returns A vector whose three elements are equal to zero (that is, it returns the vector (0,0,0).

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 static ValueTuple<Vector3,Vector3> SinCos( Vector3 vector )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public static Vector3 Sin( Vector3 vector )

😔 No documentation found.

public static Vector3 Round( Vector3 vector, MidpointRounding mode )

😔 No documentation found.

public static Vector3 Round( Vector3 vector )

😔 No documentation found.

public float Length( )

😔 No documentation found.

public float LengthSquared( )

😔 No documentation found.

public Vector3( ReadOnlySpan<float> values )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public static Vector3 RadiansToDegrees( Vector3 radians )

😔 No documentation found.

public static Vector3 Truncate( Vector3 vector )

😔 No documentation found.

public static Vector3 Log2( Vector3 vector )

😔 No documentation found.

public static Vector3 E { get; }

😔 No documentation found.

public static Vector3 Epsilon { get; }

😔 No documentation found.

public static Vector3 NaN { get; }

😔 No documentation found.

public static Vector3 NegativeInfinity { get; }

😔 No documentation found.

public static Vector3 NegativeZero { get; }

😔 No documentation found.

public static Vector3 Pi { get; }

😔 No documentation found.

public static Vector3 PositiveInfinity { get; }

😔 No documentation found.

public static Vector3 Tau { get; }

😔 No documentation found.

public float Item { get; set; }

😔 No documentation found.

public static Vector3 ClampNative( Vector3 value1, Vector3 min, Vector3 max )

😔 No documentation found.

public static Vector3 CopySign( Vector3 value, Vector3 sign )

😔 No documentation found.

public static Vector3 Cos( Vector3 vector )

😔 No documentation found.

public static Vector3 Create( float value )

😔 No documentation found.

public static Vector3 Create( Vector2 vector, float z )

😔 No documentation found.

public static Vector3 MultiplyAddEstimate( Vector3 left, Vector3 right, Vector3 addend )

😔 No documentation found.

public static Vector3 Create( float x, float y, float z )

😔 No documentation found.

public static Vector3 DegreesToRadians( Vector3 degrees )

😔 No documentation found.

public static Vector3 Exp( Vector3 vector )

😔 No documentation found.

public static Vector3 FusedMultiplyAdd( Vector3 left, Vector3 right, Vector3 addend )

😔 No documentation found.

public static Vector3 Hypot( Vector3 x, Vector3 y )

😔 No documentation found.

public static Vector3 Lerp( Vector3 value1, Vector3 value2, Vector3 amount )

😔 No documentation found.

public static Vector3 Log( Vector3 vector )

😔 No documentation found.

public static Vector3 MaxMagnitude( Vector3 value1, Vector3 value2 )

😔 No documentation found.

public static Vector3 MaxMagnitudeNumber( Vector3 value1, Vector3 value2 )

😔 No documentation found.

public static Vector3 MaxNative( Vector3 value1, Vector3 value2 )

😔 No documentation found.

public static Vector3 MaxNumber( Vector3 value1, Vector3 value2 )

😔 No documentation found.

public static Vector3 MinMagnitude( Vector3 value1, Vector3 value2 )

😔 No documentation found.

public static Vector3 MinMagnitudeNumber( Vector3 value1, Vector3 value2 )

😔 No documentation found.

public static Vector3 MinNative( Vector3 value1, Vector3 value2 )

😔 No documentation found.

public static Vector3 Create( ReadOnlySpan<float> values )

😔 No documentation found.

public static Vector3 MinNumber( Vector3 value1, Vector3 value2 )

😔 No documentation found.