# Vector4F Structure

A structure encapsulating four single precision floating point values.

Namespace:  NeoAxis
Assembly:  NeoAxis.Core (in NeoAxis.Core.dll) Version: 2024.1.1.0 (2024.1.1.0)
Syntax
C#
`public struct Vector4F`

The Vector4F type exposes the following members.

Constructors
NameDescription
Vector4F(Vector4F)
Constructs a vector with another given vector.
Vector4F(Vector3F, Single)
Constructs a Vector4F from the given Vector3F and a W component.
Vector4F(Single, Single, Single, Single)
Constructs a vector with the given individual elements.
Top
Properties
NameDescription
Item
Gets or sets the component at the specified index.
Top
Methods
NameDescription
Abs
Returns a vector whose elements are the absolute values of each of the specified vector's components.
Acos
Calculates the arc-cosine of each component of the specified vector.
AllNonZero
Determines whether all components of a given vector are unequal to the zero.
AnyNonZero
Determines whether any component of a given vector is unequal to the zero.
Asin
Calculates the arc-sine of each component of the specified vector.
Atan
Calculates the arc-tangent of each component of the specified vector.
Atan2
Returns the vector which contains the angles in radians whose tangents are the quotient of the corresponding components in the first specified vector y and the second specified vector x.
Cos
Calculates the cosine of each component of the specified vector.
Cosh
Calculates the hyperbolic cosine of each component of the specified vector.
Distance(Vector4F, Vector4F)
Calculates the distance between two vectors.
Distance(Vector4F, Vector4F)
Calculates the distance between two vectors.
Divide(Single, Vector4F, Vector4F)
Divides a scalar by a vector.
Divide(Vector4F, Vector4F, Vector4F)
Divides the first vector by the second vector.
Divide(Vector4F, Single, Vector4F)
Divides a vector by a given scalar.
Dot(Vector4F)
Calculates the dot product of two vectors.
Dot(Vector4F)
Calculates the dot product of two vectors.
Dot(Vector4F, Vector4F)
Calculates the dot product of two vectors.
Dot(Vector4F, Vector4F)
Calculates the dot product of two vectors.
Equals(Object)
Determines whether the specified object is equal to the current instance of Vector4F.
(Overrides ValueTypeEquals(Object).)
Equals(Vector4F)
Equals(Vector4F, Single)
Determines whether the specified vector is equal to the current instance of Vector4F with a given precision.
Equals(Vector4F, Vector4F)
Equals(Vector4F, Single)
Determines whether the specified vector is equal to the current instance of Vector4F with a given precision.
Exp
Returns the vector which contains e raised to the power of n, where n is the corresponding component in the specified vector.
GetClamp
Restricts the current instance of Vector4F to be within a specified range and returns the clamped value.
GetHashCode
Returns a hash code for this instance.
(Overrides ValueTypeGetHashCode.)
GetNormalize
Converts the current instance of Vector4F into a unit vector and returns the normalized vector.
GetSaturate
Clamps the components of the current instance of Vector4F between 0 and 1 and returns the saturated value.
GetTruncate
Rounds a given vector towards zero for each component in it and returns the truncated vector.
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Length
Calculates the length of the current instance of Vector4F.
LengthSquared
Calculates the squared length of the current instance of Vector4F.
Lerp(Vector4F, Vector4F, Single)
Performs a linear interpolation between two vectors based on the given weighting.
Lerp(Vector4F, Vector4F, Single, Vector4F)
Performs a linear interpolation between two vectors based on the given weighting.
Log
Calculates the natural logarithm of each component of the specified vector.
Log10
Calculates the base 10 logarithm of each component of the specified vector.
Max
Returns a vector containing the largest components of the specified vectors.
MaxComponent
Returns the value of the largest component of the current instance of Vector4F.
Min
Returns a vector containing the smallest components of the specified vectors.
MinComponent
Returns the value of the smallest component of the current instance of Vector4F.
Multiply(Single, Vector4F, Vector4F)
Multiplies a vector by a given scalar.
Multiply(Vector4F, Vector4F, Vector4F)
Multiplies two vectors together.
Multiply(Vector4F, Single, Vector4F)
Multiplies a vector by a given scalar.
Negate
Reverses the direction of a given vector.
Normalize
Converts the current instance of Vector4F into a unit vector.
Normalize(Vector4F)
Converts a vector into a unit vector.
Normalize(Vector4F, Vector4F)
Converts a vector into a unit vector.
Parse
Converts a string representation of a vector into the equivalent Vector4F structure.
Pow
Returns the vector which contains the components of the first specified vector raised to power of the numbers which are equal to the corresponding components of the second specified vector.
Saturate
Clamps the components of the current instance of Vector4F between 0 and 1.
Select
Chooses one of two vectors depending on the pick1 value.
Sin
Calculates the sine of each component of the specified vector.
Sinh
Calculates the hyperbolic sine of each component of the specified vector.
Sqrt
Calculates the square root of each component of the specified vector.
Subtract
Subtracts two vectors.
Tan
Calculates the tangent of each component of the specified vector.
Tanh
Calculates the hyperbolic tangent of each component of the specified vector.
ToColorValue
Converts each component of the current instance of Vector4F into the component of the ColorValue structure: X to red component, Y to green component, Z to blue component, W to alpha component.
ToPlane
Converts the current instance of Vector4F into the equivalent Plane structure.
ToString
Returns a String that represents the current instance of Vector4F.
(Overrides ValueTypeToString.)
ToString(Int32)
Returns a String that represents the current instance of Vector4F with a given precision.
ToVector2F
Converts the current instance of Vector4F into an instance of Vector2F.
ToVector3
Converts the current instance of Vector4F into an instance of Vector2F.
ToVector3F
Converts the current instance of Vector4F into an instance of Vector3F.
ToVector4
Converts the current instance of Vector4F into the equivalent Vector4 structure.
ToVector4H
Converts the current instance of Vector4F into the equivalent Vector4H structure.
ToVector4I
Converts the current instance of Vector4F into the equivalent Vector4I structure.
Truncate
Rounds the current instance of Vector4F towards zero for each component in a vector.
Top
Operators
NameDescription
Division(Single, Vector4F)
Divides a scalar by a vector.
Division(Vector4F, Vector4F)
Divides the first vector by the second vector.
Division(Vector4F, Single)
Divides a vector by a given scalar.
Equality
Determines whether two given vectors are equal.
(Vector4F to Vector4)
Implicit conversion from Vector4F type to Vector4 type for given value.
Inequality
Determines whether two given vectors are unequal.
Multiply(Single, Vector4F)
Multiplies a vector by a given scalar.
Multiply(Vector4F, Vector4F)
Multiplies two vectors together.
Multiply(Vector4F, Single)
Multiplies a vector by a given scalar.
Subtraction
Subtracts two vectors.
UnaryNegation
Reverses the direction of a given vector.
Top
Fields
NameDescription
One
Returns the vector (1,1,1,1).
W
The W component of the vector.
X
The X component of the vector.
Y
The Y component of the vector.
Z
The Z component of the vector.
Zero
Returns the vector (0,0,0,0).
Top
Extension Methods
NameDescription
MethodInvoke
Calls the object method by name.
(Defined by ObjectEx.)