How can i create function to find Angle between vector by use 3D position of each joint

Hi!
Look at this: