parameters: (self,newframe)
return_statement: return Direction(newlocal,newframe)
docstring: Returns a Direction representing the same direction in space, but
          in a different reference frame
docstring_summary: Returns a Direction representing the same direction in space, but
          in a different reference frame
docstring_tokens: Returns a Direction representing the same direction in space but in a different reference frame
function: def to(self,newframe):
          """Returns a Direction representing the same direction in space, but
          in a different reference frame"""
          if newframe == None or newframe=='world':
              return self.toWorld()
          newlocal = so3.apply(so3.inv(newframe.worldCoordinates()[0]),self.worldCoordinates())
          return Direction(newlocal,newframe)
function_tokens: def to ( self , newframe ) : if newframe == None or newframe == 'world' : return self . toWorld ( ) newlocal = so3 . apply ( so3 . inv ( newframe . worldCoordinates ( ) [ 0 ] ) , self . worldCoordinates ( ) ) return Direction ( newlocal , newframe )