# How to calculate the angle between 2 vectors in 3D space given a preset function

In my application, I am attempting to connect 2 points in 3d space with a cylinder via a function taking in 2 vectors. I understand that I need the angle to apply to the cylinder. As I understand, I can calculate this angle with the dot product of both vectors. How can I know how to apply the angle given this function:

func SCNMatrix4MakeRotation(angle: Float, x: Float, y: Float, z: Float) -> SCNMatrix4


where:

angle: The amount of rotation, in radians, measured counterclockwise around the rotation axis.
x: The x-component of the rotation axis.
y: The y-component of the rotation axis.
z: The z-component of the rotation axis.


How should I apply the correct angle here? Parameters x, y, and z take in a number between 0 and 1. With respect to which plane does the rotation occur?

The angle between vectors $\vec{x}$ and $\vec{y}$ is defined using the dot product like so: $$\cos(\theta) = \frac{\vec{x}\cdot \vec{y}}{\|\vec{x}\| \ \|\vec{y}\|}$$ where the expression $\|\vec{a}\| = \sqrt{a_1^2 + a_2^2 + a_3^2}$ is the magnitude/norm of a vector. The magnitude of a vector in 3D space is just the square root of the sum of the squares of the $i,j,k$ components of that vector.