# Module dlib.math.vector

Vectors of Euclidean space

## Functions

NameDescription
``` cross(a, b) ``` Cross product
``` cross(a, b, c) ``` Cross product for 4-vectors
``` distance(a, b) ``` Compute distance between two 2D points
``` distance(a, b) ``` Compute distance between two 3D points
``` distancesqr(a, b) ``` Compute squared distance between two 2D points
``` distancesqr(a, b) ``` Compute squared distance between two 3D points
``` dot(a, b) ``` Dot product
``` faceforward(N, I, Nref) ```
``` isAlmostZero(v) ``` Is all elements almost zero
``` lvector(x) ``` L-value pseudovector for assignment purposes.
``` planeNormal(p1, p2, p3) ``` Compute normal of a plane from three points
``` randomUnitVector2() ``` Random unit length 2-vector
``` randomUnitVector3() ``` Random unit length 3-vector
``` reflect(I, N) ```
``` refract(I, N, r) ```
``` rotateAroundAxis(V, P, D, angle) ```
``` slerp(a, b, t) ``` Spherical linear interpolation (simple lerp is in dlib.math.interpolation)
``` tensorProduct(u, v) ``` Tensor product
``` vectorDecreaseToZero(vector, step) ``` Gradually decrease vector to zero length
``` vectorf(t) ``` Vector factory function

## Structs

NameDescription
``` AxisVector ``` Axis vectors
``` Vector ``` Vector representation

## Aliases

NameTypeDescription
`ivec2` `Vector!(int,2)` GLSL-like short aliases
`Vector2d` `Vector!(double,2)` Alias for 2-vector of doubles
`Vector2f` `Vector!(float,2)` Alias for 2-vector of floats
`Vector2i` `Vector!(int,2)` Predefined vector types Alias for 2-vector of ints
`Vector2u` `Vector!(uint,2)` Alias for 2-vector of uints
`Vector3d` `Vector!(double,3)` Alias for 2-vector of doubles
`Vector3f` `Vector!(float,3)` Alias for 3-vector of floats
`Vector3i` `Vector!(int,3)` Alias for 3-vector of ints
`Vector3u` `Vector!(uint,3)` Alias for 3-vector of uints
`Vector4d` `Vector!(double,4)` Alias for 4-vector of doubles
`Vector4f` `Vector!(float,4)` Alias for 4-vector of floats
`Vector4i` `Vector!(int,4)` Alias for 4-vector of ints
`Vector4u` `Vector!(uint,4)` Alias for 4-vector of uints