Click or drag to resize
Accord.NET (logo)

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
Request Example View Source

The Vector4 type exposes the following members.

Constructors
  NameDescription
Public methodVector4(Single)
Initializes a new instance of the Vector4 structure.
Public methodVector4(Single, Single, Single, Single)
Initializes a new instance of the Vector4 structure.
Top
Properties
  NameDescription
Public propertyMax
Returns maximum value of the vector.
Public propertyMaxIndex
Returns index of the coordinate with maximum value.
Public propertyMin
Returns minimum value of the vector.
Public propertyMinIndex
Returns index of the coordinate with minimum value.
Public propertyNorm
Returns vector's norm.
Public propertySquare
Returns square of the vector's norm.
Top
Methods
  NameDescription
Public methodAbs
Calculate absolute values of the vector.
Public methodStatic memberAdd(Vector4, Vector4)
Adds corresponding coordinates of two vectors.
Public methodStatic memberAdd(Vector4, Single)
Adds a value to all coordinates of the specified vector.
Public methodStatic memberDivide(Vector4, Vector4)
Divides corresponding coordinates of two vectors.
Public methodStatic memberDivide(Vector4, Single)
Divides coordinates of the specified vector by the specified factor.
Public methodStatic memberDot
Calculates dot product of two vectors.
Public methodEquals(Object)
Tests whether the vector equals to the specified object.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Vector4)
Tests whether the vector equals to the specified one.
Public methodGetHashCode
Returns the hashcode for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInverse
Inverse the vector.
Public methodStatic memberMultiply(Vector4, Vector4)
Multiplies corresponding coordinates of two vectors.
Public methodStatic memberMultiply(Vector4, Single)
Multiplies coordinates of the specified vector by the specified factor.
Public methodNormalize
Normalizes the vector by dividing it’s all coordinates with the vector's norm.
Public methodStatic memberSubtract(Vector4, Vector4)
Subtracts corresponding coordinates of two vectors.
Public methodStatic memberSubtract(Vector4, Single)
Subtracts a value from all coordinates of the specified vector.
Public methodToArray
Returns array representation of the vector.
Public methodToString
Returns a string representation of this object.
(Overrides ValueTypeToString.)
Public methodToVector3
Converts the vector to a 3D vector.
Top
Operators
  NameDescription
Public operatorStatic memberAddition(Vector4, Vector4)
Adds corresponding coordinates of two vectors.
Public operatorStatic memberAddition(Vector4, Single)
Adds a value to all coordinates of the specified vector.
Public operatorStatic memberDivision(Vector4, Vector4)
Divides corresponding coordinates of two vectors.
Public operatorStatic memberDivision(Vector4, Single)
Divides coordinates of the specified vector by the specified factor.
Public operatorStatic memberEquality
Tests whether two specified vectors are equal.
Public operatorStatic memberInequality
Tests whether two specified vectors are not equal.
Public operatorStatic memberMultiply(Vector4, Vector4)
Multiplies corresponding coordinates of two vectors.
Public operatorStatic memberMultiply(Vector4, Single)
Multiplies coordinates of the specified vector by the specified factor.
Public operatorStatic memberSubtraction(Vector4, Vector4)
Subtracts corresponding coordinates of two vectors.
Public operatorStatic memberSubtraction(Vector4, Single)
Subtracts a value from all coordinates of the specified vector.
Top
Fields
  NameDescription
Public fieldW
W coordinate of the vector.
Public fieldX
X coordinate of the vector.
Public fieldY
Y coordinate of the vector.
Public fieldZ
Z coordinate of the vector.
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(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.)
Public Extension MethodToTOverloaded.
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