parameters: (axis : Vector3, angle: float)
return_statement: return R
docstring: Given a unit axis and an angle in radians, returns the rotation
      matrix.
docstring_summary: Given a unit axis and an angle in radians, returns the rotation
      matrix.
docstring_tokens: Given a unit axis and an angle in radians returns the rotation matrix .
function: def rotation(axis : Vector3, angle: float) -> Rotation:
      """Given a unit axis and an angle in radians, returns the rotation
      matrix."""
      cm = math.cos(angle)
      sm = math.sin(angle)
  
      #m = s[r]-c[r][r]+rrt = s[r]-c(rrt-I)+rrt = cI + rrt(1-c) + s[r]
      R = vectorops.mul(cross_product(axis),sm)
      for i in range(3):
          for j in range(3):
              R[i*3+j] += axis[i]*axis[j]*(1.-cm)
      R[0] += cm
      R[4] += cm
      R[8] += cm
      return R
function_tokens: def rotation ( axis : Vector3 , angle : float ) -> Rotation : cm = math . cos ( angle ) sm = math . sin ( angle ) #m = s[r]-c[r][r]+rrt = s[r]-c(rrt-I)+rrt = cI + rrt(1-c) + s[r] R = vectorops . mul ( cross_product ( axis ) , sm ) for i in range ( 3 ) : for j in range ( 3 ) : R [ i * 3 + j ] += axis [ i ] * axis [ j ] * ( 1. - cm ) R [ 0 ] += cm R [ 4 ] += cm R [ 8 ] += cm return R