sys/dev/netif/ath/hal/ath_hal/ar5416/ar5416_reset.c
static int16_t
interpolate(uint16_t target, uint16_t srcLeft, uint16_t srcRight,
            int16_t targetLeft, int16_t targetRight)
{
    int16_t rv;

    if (srcRight == srcLeft) {
        rv = targetLeft;
    } else {
        rv = (int16_t)( ((target - srcLeft) * targetRight +
              (srcRight - target) * targetLeft) / (srcRight - srcLeft) );
    }
    return rv;
}
/**************************************************************************
 * interpolate
 *
 * Returns signed interpolated or the scaled up interpolated value
 */
interpolate
Returns signed interpolated or the scaled up interpolated value
interpolate Returns signed interpolated or the scaled up interpolated value
static int16_t
interpolate(uint16_t target, uint16_t srcLeft, uint16_t srcRight,
            int16_t targetLeft, int16_t targetRight)
{
    int16_t rv;
    if (srcRight == srcLeft) {
        rv = targetLeft;
    } else {
        rv = (int16_t)( ((target - srcLeft) * targetRight +
              (srcRight - target) * targetLeft) / (srcRight - srcLeft) );
    }
    return rv;
}
static int16_t interpolate ( uint16_t target , uint16_t srcLeft , uint16_t srcRight , int16_t targetLeft , int16_t targetRight ) { int16_t rv ; if ( srcRight == srcLeft ) { rv = targetLeft ; } else { rv = ( int16_t ) ( ( ( target - srcLeft ) * targetRight + ( srcRight - target ) * targetLeft ) / ( srcRight - srcLeft ) ) ; } return rv ; }
interpolate
 Returns signed interpolated or the scaled up interpolated value
interpolate Returns signed interpolated or the scaled up interpolated value