title: How to rotate a Three.js Vector3 around another Vector3?
body: <p>Here I want to rotate 'endpoint' vector around 'startpoint' vector.</p>
  
  <p>This rotates endpoint vector around world's z-axis:</p>
  
  <pre><code> endpoint.copy(new THREE.Vector3(startpoint.x,startpoint.y,startpoint.z));
   endpoint.add(new THREE.Vector3(0, scale, 0 ));
  
   var matrix = new THREE.Matrix4().makeRotationAxis( axis_z, angle );
   endpoint.applyMatrix4( matrix );
  </code></pre>
  
  <p>I have tried to save vector's translation to temporary matrix, and after applying rotation, restore translation back to endpoint vector:</p>
  
  <pre><code> endpoint.copy(new THREE.Vector3(startpoint.x,startpoint.y,startpoint.z));
   endpoint.add(new THREE.Vector3(0, scale, 0 ));  
  
   var translateMatrix = new THREE.Matrix4().makeTranslation(endpoint.x, endpoint.y,   endpoint.z);
   var translation = new THREE.Matrix4().copyPosition(translateMatrix); 
   translateMatrix.makeRotationAxis(axis_z, angle);
   translateMatrix.copyPosition(translation);
   endpoint.applyMatrix4(translateMatrix);
  </code></pre>
  
  <p>This code works for rotations, but all the translations are wrong.
  Is there an easy way for vector rotation relative to another vector?</p>
  
  <p>UPD. Resolved this. I was blind. No need for translations. What I had to do: apply rotation to vectors delta (endpoint - startpoint), and in the end, add the rotated delta to startpoint (startpoint + delta):</p>
  
  <pre><code>var vector_delta = new THREE.Vector3().subVectors(endpoint, startpoint);
  vector_delta.applyAxisAngle( axis_z, rota );
  endpoint.addVectors(startpoint, vector_delta); 
  </code></pre>