Calibrating sensors - should be easy?

Here is the integer-version of the scale function you where looking for...
http://www.arduino.cc/playground/Main/Autoscale

Never used it myself, I simply knew by accident it was somewhere on the playground...

Eberhard