﻿ Vector4 Structure   # Vector4 Structure

4D Vector structure with X, Y, Z and W coordinates.

Namespace:  Accord.Math
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0 Syntax
```[SerializableAttribute]
public struct Vector4```

The Vector4 type exposes the following members. Constructors
NameDescription Vector4(Single)
Initializes a new instance of the Vector4 structure. Vector4(Single, Single, Single, Single)
Initializes a new instance of the Vector4 structure.
Top Properties
NameDescription Max
Returns maximum value of the vector. MaxIndex
Returns index of the coordinate with maximum value. Min
Returns minimum value of the vector. MinIndex
Returns index of the coordinate with minimum value. Norm
Returns vector's norm. Square
Returns square of the vector's norm.
Top Methods
NameDescription Abs
Calculate absolute values of the vector.  Add(Vector4, Vector4)
Adds corresponding coordinates of two vectors.  Add(Vector4, Single)
Adds a value to all coordinates of the specified vector.  Divide(Vector4, Vector4)
Divides corresponding coordinates of two vectors.  Divide(Vector4, Single)
Divides coordinates of the specified vector by the specified factor.  Dot
Calculates dot product of two vectors. Equals(Object)
Tests whether the vector equals to the specified object.
(Overrides ValueTypeEquals(Object).) Equals(Vector4)
Tests whether the vector equals to the specified one. GetHashCode
Returns the hashcode for this instance.
(Overrides ValueTypeGetHashCode.) GetType
Gets the Type of the current instance.
(Inherited from Object.) Inverse
Inverse the vector.  Multiply(Vector4, Vector4)
Multiplies corresponding coordinates of two vectors.  Multiply(Vector4, Single)
Multiplies coordinates of the specified vector by the specified factor. Normalize
Normalizes the vector by dividing it’s all coordinates with the vector's norm.  Subtract(Vector4, Vector4)
Subtracts corresponding coordinates of two vectors.  Subtract(Vector4, Single)
Subtracts a value from all coordinates of the specified vector. ToArray
Returns array representation of the vector. ToString
Returns a string representation of this object.
(Overrides ValueTypeToString.) ToVector3
Converts the vector to a 3D vector.
Top Operators
NameDescription  Addition(Vector4, Vector4)
Adds corresponding coordinates of two vectors.  Addition(Vector4, Single)
Adds a value to all coordinates of the specified vector.  Division(Vector4, Vector4)
Divides corresponding coordinates of two vectors.  Division(Vector4, Single)
Divides coordinates of the specified vector by the specified factor.  Equality
Tests whether two specified vectors are equal.  Inequality
Tests whether two specified vectors are not equal.  Multiply(Vector4, Vector4)
Multiplies corresponding coordinates of two vectors.  Multiply(Vector4, Single)
Multiplies coordinates of the specified vector by the specified factor.  Subtraction(Vector4, Vector4)
Subtracts corresponding coordinates of two vectors.  Subtraction(Vector4, Single)
Subtracts a value from all coordinates of the specified vector.
Top Fields
NameDescription W
W coordinate of the vector. X
X coordinate of the vector. Y
Y coordinate of the vector. Z
Z coordinate of the vector.
Top Extension Methods
NameDescription HasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) IsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.) To(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) ToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top Remarks

The structure incapsulates X, Y, Z and W coordinates of a 4D vector and provides some operations with it. See Also