home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / SoundAndMusic / cmix / lib / wshape.c < prev   
Text File  |  1990-04-13  |  262b  |  18 lines

  1. float wshape(x,f,len)
  2. float x,*f;
  3. int len;
  4.  
  5. {
  6. /* use function f as static transfer function from x to returned value*/
  7.  
  8.         int i1;
  9.     float x1, diff;
  10.  
  11.  
  12.     x1=(x+1)*(float)((len-1)/2.);
  13.     i1=x1;
  14.     diff=(float)(x1-i1);
  15.  
  16.     return(*(f+i1)+(*(f+i1+1)-*(f+i1))*diff);
  17. }
  18.