General interpolation formula (
Pascal version
available)
phi( key, lo, up) typekey key; int lo, up; {int i; i = (key-MinKey) * (up-lo+1.0) / (MaxKey-MinKey) + lo; return( i>up ? up : i
C
source (41.phi.c)
Pascal
source (41.phi.p)
©
Addison-Wesley
Publishing Co. Inc.