Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/12/03 17:43
Read: times


 
#56561 - RE: Avaraging
Responding to: ???'s previous message
Hehe, see I told you "I did not check for errors" :-)
static unsigned maUpdate(struct MOVING_AVG *maP, unsigned sample)
{
    maP->sampleTotal           -= maP->sample[maP->sampleIdx];
    maP->sampleTotal           += sample;
    maP->sample[maP->sampleIdx] = sample;
    maP->sampleIdx              = (maP->sampleIdx + 1) & 0x0F;

    return (maP->sampleTotal >> 4);
}



List of 8 messages in thread
TopicAuthorDate
Avaraging            01/01/70 00:00      
   RE: Avaraging            01/01/70 00:00      
   RE: Avaraging            01/01/70 00:00      
      RE: Avaraging            01/01/70 00:00      
   RE: Avaraging            01/01/70 00:00      
   RE: Avaraging            01/01/70 00:00      
      RE: Avaraging            01/01/70 00:00      
   RE: Avaraging            01/01/70 00:00      

Back to Subject List