sngX1 := UINT_TO_REAL (uintX1);
sngX2 := UINT_TO_REAL (uintX2);
sngY1 := UINT_TO_REAL (uintY1);
sngY2 := UINT_TO_REAL (uintY2);
sngX := UINT_TO_REAL (uintX)*EXPT (10.0, uintDecPtDiff);
IF sngX <= sngX1 THEN
uintY := REAL_TO_UINT (sngY1);
ELSIF sngX >= sngX2 THEN
uintY := REAL_TO_UINT (sngY2);
ELSE
uintY := REAL_TO_UINT (sngY1+(sngY2-sngY1)/(sngX2-sngX1)*(sngX-sngX1));
END_IF;