src/math/Vector.js
/*
 * Returns the angle between two different vectors
 * @param {x,y,z} vector1 - First vector to be compared
 * @param {x,y,z} vector2 - Second vector to be compared
 * @returns float - Calculated angle in degrees
 */
Returns the angle between two different vectors
@param {x,y,z} vector1 - First vector to be compared
@param {x,y,z} vector2 - Second vector to be compared
@returns float - Calculated angle in degrees
Returns the angle between two different vectors @param { x y z } vector1 - First vector to be compared @param { x y z } vector2 - Second vector to be compared @returns float - Calculated angle in degrees
function AngleBetweenVectors(vector1, vector2) {
  const dotProd = vector1.x * vector2.x + vector1.y * vector2.y + vector1.z * vector2.z;
  const lengthSQ1 = vector1.x * vector1.x + vector1.y * vector1.y + vector1.z * vector1.z;
  const lengthSQ2 = vector2.x * vector2.x + vector2.y * vector2.y + vector2.z * vector2.z;
  return 180 / Math.PI * Math.acos(dotProd / Math.sqrt(lengthSQ1 * lengthSQ2));
}
function AngleBetweenVectors ( vector1 , vector2 ) { const dotProd = vector1 . x * vector2 . x + vector1 . y * vector2 . y + vector1 . z * vector2 . z ; const lengthSQ1 = vector1 . x * vector1 . x + vector1 . y * vector1 . y + vector1 . z * vector1 . z ; const lengthSQ2 = vector2 . x * vector2 . x + vector2 . y * vector2 . y + vector2 . z * vector2 . z ; return 180 / Math . PI * Math . acos ( dotProd / Math . sqrt ( lengthSQ1 * lengthSQ2 ) ) ; }
Returns the angle between two different vectors
 @param {x,y,z} vector1 - First vector to be compared
 @param {x,y,z} vector2 - Second vector to be compared
 @returns float - Calculated angle in degrees
Returns the angle between two different vectors @param { x y z } vector1 - First vector to be compared @param { x y z } vector2 - Second vector to be compared @returns float - Calculated angle in degrees