pattern.c
int32_t lLinearLookup( int32_t val, int32_t y2, int32_t y1, int32_t x2, int32_t x1 )
{
    int32_t slope = (y2 - y1) / (x2 - x1);
    int32_t intercept = y2 - slope*x2;

    return val*slope + intercept;
}
/**
  * @brief  Does a linear lookup.
  * @retval Linear lookup of value.
  */
@brief  Does a linear lookup.
@retval Linear lookup of value.
@brief Does a linear lookup . @retval Linear lookup of value .
int32_t lLinearLookup( int32_t val, int32_t y2, int32_t y1, int32_t x2, int32_t x1 )
{
    int32_t slope = (y2 - y1) / (x2 - x1);
    int32_t intercept = y2 - slope*x2;
    return val*slope + intercept;
}
int32_t lLinearLookup ( int32_t val , int32_t y2 , int32_t y1 , int32_t x2 , int32_t x1 ) { int32_t slope = ( y2 - y1 ) / ( x2 - x1 ) ; int32_t intercept = y2 - slope * x2 ; return val * slope + intercept ; }
@brief  Does a linear lookup.
@brief Does a linear lookup .