Changeset 2442:2750ac386c39 in roaraudio for libroardsp


Ignore:
Timestamp:
08/19/09 23:02:16 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added roar_math_cvpoly()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroardsp/poly.c

    r1369 r2442  
    105105 
    106106 
     107float roar_math_cvpoly     (float * poly, float t, int len) { 
     108 float ret = 0; 
     109 float ct  = 1; 
     110 int i; 
     111 
     112 if ( poly == NULL ) 
     113  return 0; 
     114 
     115 switch (len) { 
     116  case 4: return roar_math_cvpoly_4x4(poly, t); 
     117 } 
     118 
     119 for (i = 0; i < len; i++) { 
     120  ret += poly[i] * ct; 
     121  ct  *= t; 
     122 } 
     123 
     124 return ret; 
     125} 
     126 
    107127float roar_math_cvpoly_4x4 (float * poly, float t) { 
    108128 float ret = poly[0]; 
Note: See TracChangeset for help on using the changeset viewer.