title: Implements turn left function in openGL
body: <p>Basically, I need to change the eye and up vectors correctly when pressing the left key (turning the view to right). My implementation is as follows but it does not seem to pass the tests. Anyone can help?</p>
  
  <pre><code>// Transforms the camera left around the "crystal ball" interface
  void Transform::left(float degrees, vec3&amp; eye, vec3&amp; up) {
      // YOUR CODE FOR HW1 HERE
      eye = rotate(degrees, vec3(0, 1, 0)) * eye;
      up = rotate(degrees, vec3(0, 1, 0)) * up;
  }
  </code></pre>
  
  <p>The rotation function takes two arguments degree and axis, and returns the rotation matrix which is a 3 by 3 matrix:</p>
  
  <pre><code>mat3 Transform::rotate(const float degrees, const vec3&amp; axis) {
      // YOUR CODE FOR HW1 HERE
  
      mat3 rot, I(1.0);
      mat3 a_x;
      a_x[0][0] = 0;
      a_x[0][1] = -axis[2];
      a_x[0][2] = axis[1];
      a_x[1][0] = axis[2];
      a_x[1][1] = 0;
      a_x[1][2] = -axis[0];
      a_x[2][0] = -axis[1];
      a_x[2][1] = axis[0];
      a_x[2][2] = 0;
      float theta = degrees / 180 * pi;
      rot = I * cos(theta) + glm::outerProduct(axis, axis) *(1-cos(theta)) + a_x*sin(theta);
      return rot;
  }  
  </code></pre>