parameters: (self, eq,trigvars)
return_statement: return eq
docstring: recurses the sin**2 = 1-cos**2 equation for every trig var
docstring_summary: recurses the sin**2 = 1-cos**2 equation for every trig var
docstring_tokens: recurses the sin ** 2 = 1 - cos ** 2 equation for every trig var
function: def trigsimp(self, eq,trigvars):
          """recurses the sin**2 = 1-cos**2 equation for every trig var
          """
          trigsubs = []
          for v in trigvars:
              if self.IsHinge(v.name):
                  trigsubs.append((sin(v)**2,1-cos(v)**2))
                  trigsubs.append((Symbol('s%s'%v.name)**2,1-Symbol('c%s'%v.name)**2))
          eq=expand(eq)
          curcount = eq.count_ops()
          while True:
              eq=eq.subs(trigsubs).expand()
              newcount = eq.count_ops()
              if IKFastSolver.equal(curcount,newcount):
                  break
              curcount=newcount
          return eq
function_tokens: def trigsimp ( self , eq , trigvars ) : trigsubs = [ ] for v in trigvars : if self . IsHinge ( v . name ) : trigsubs . append ( ( sin ( v ) ** 2 , 1 - cos ( v ) ** 2 ) ) trigsubs . append ( ( Symbol ( 's%s' % v . name ) ** 2 , 1 - Symbol ( 'c%s' % v . name ) ** 2 ) ) eq = expand ( eq ) curcount = eq . count_ops ( ) while True : eq = eq . subs ( trigsubs ) . expand ( ) newcount = eq . count_ops ( ) if IKFastSolver . equal ( curcount , newcount ) : break curcount = newcount return eq