### 7.10.2 math.inc - Vector functions and macros

These are all macros in the current version because functions can not take vector parameters, but this may change in the future.

`VSqr(V)`. Square each individual component of a vector, equivalent to `V*V`.
Parameters:

- `V` = Vector to be squared.

`VPow(V, P), VPow5D(V, P)`. Raise each individual component of a vector to a given power.
Parameters:

- `V` = Input vector.
- `P` = Power.

`VEq(V1, V2)`. Tests for equal vectors, returns true if all three components of `V1`equal the respective components of `V2`.
Parameters:

- `V1, V2` = The vectors to be compared.

`VEq5D(V1, V2)`. A 5D version of `VEq()`. Tests for equal vectors, returns true if all 5 components of `V1` equal the respective components of `V2`.
Parameters:

- `V1, V2` = The vectors to be compared.

`VZero(V)`. Tests for a < 0, 0, 0> vector.
Parameters:

- `V` = Input vector.

`VZero5D(V)`. Tests for a < 0, 0, 0, 0, 0> vector.
Parameters:

- `V` = Input vector.

`VLength5D(V)`. Computes the length of a 5D vector.
Parameters:

- `V` = Input vector.

`VNormalize5D(V)`. Normalizes a 5D vector.
Parameters:

- `V` = Input vector.

`VDot5D(V1, V2)`. Computes the dot product of two 5D vectors. See vdot() for more information on dot products.
Parameters:

- `V` = Input vector.

`VCos_Angle(V1, V2)`. Compute the cosine of the angle between two vectors.
Parameters:

- `V1, V2` = Input vectors.

`VAngle(V1, V2), VAngleD(V1, V2)`. Compute the angle between two vectors. `VAngle()` returns the angle in radians, `VAngleD()` in degrees.
Parameters:

- `V1, V2` = Input vectors.

`VRotation(V1, V2, Axis), VRotationD(V1, V2, Axis)`.Compute the rotation angle from V1 to V2 around Axis. Axis should be perpendicular to both V1 and V2. The output will be in the range between -pi and pi radians or between -180 degrees and 180 degrees if you are using the degree version. However, if Axis is set to <0,0,0> the output will always be positive or zero, the same result you will get with the VAngle() macros.
Parameters:

- `V1, V2` = Input vectors.

`VDist(V1, V2)`. Compute the distance between two points.
Parameters:

- `V1, V2` = Input vectors.

`VPerp_To_Vector(V)`. Find a vector perpendicular to the given vector.
Parameters:

- `V` = Input vector.

`VPerp_To_Plane(V1, V2)`. Find a vector perpendicular to both given vectors. In other words, perpendicular to the plane defined by the two input vectors
Parameters:

- `V1, V2` = Input vectors.

`VPerp_Adjust(V1, Axis)`. Find a vector perpendicular to Axis and in the plane of V1 and Axis. In other words, the new vector is a version of V1 adjusted to be perpendicular to Axis.
Parameters:

- `V1, Axis` = Input vectors.

`VProject_Plane(V1, Axis)`. Project vector V1 onto the plane defined by Axis.
Parameters:

- `V1` = Input vectors.
- `Axis` = Normal of the plane.

`VProject_Axis(V1, Axis)`. Project vector V1 onto the axis defined by Axis.
Parameters:

- `V1, Axis` = Input vectors.

`VMin(V), VMax(V)`. Find the smallest or largest component of a vector.
Parameters:

- `V` = Input vector.

`VWith_Len(V, Len)`. Create a vector parallel to a given vector but with a given length.
Parameters:

- `V` = Direction vector.
- `Len` = Length of desired vector.