ServerConfiguration/Calla/Calla-Lib/js/Calla.CJS.js
/**
     * Performs a spherical linear interpolation between two vectors,
     * storing the result in this vector.
     * @param {Vector} a
     * @param {Vector} b
     * @param {number} p
     */
Performs a spherical linear interpolation between two vectors,
storing the result in this vector.
Performs a spherical linear interpolation between two vectors storing the result in this vector .
slerp(a, b, p) {
        const dot = a.dot(b);
        const angle = Math.acos(dot);
        if (angle !== 0) {
            const c = Math.sin(angle);
            const pA = Math.sin((1 - p) * angle) / c;
            const pB = Math.sin(p * angle) / c;
            this.x = pA * a.x + pB * b.x;
            this.y = pA * a.y + pB * b.y;
            this.x = pA * a.z + pB * b.z;
        }
    }
slerp ( a , b , p ) { const dot = a . dot ( b ) ; const angle = Math . acos ( dot ) ; if ( angle !== 0 ) { const c = Math . sin ( angle ) ; const pA = Math . sin ( ( 1 - p ) * angle ) / c ; const pB = Math . sin ( p * angle ) / c ; this . x = pA * a . x + pB * b . x ; this . y = pA * a . y + pB * b . y ; this . x = pA * a . z + pB * b . z ; } }
Performs a spherical linear interpolation between two vectors,
 storing the result in this vector.
Performs a spherical linear interpolation between two vectors storing the result in this vector .