[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Function AdjustMeter(StartMeter1,EndMeter1,ValueMeter1,
StartMeter2,EndMeter2:LongInt):LongInt;
This is a very valuable tool. It converts a set of numbers to a
different range of numbers. If you think of the numbers as bar
graphs or meters, then a number half way up the one meter must
obviously be half way up the equivalent meter which has
been stretched or expanded.
Example
Meter 1: ************************************************* 75%
Meter 2: **** 75%
In terms of numbers, let's say meter 1 was a range of numbers from
1 to 100. For some reason you need a range of numbers from 1 to 4,
(say). Obviously if the number is 75% of the way "into" 1 to 100,
(i.e. number 75) it must be 75% of the way "into" 1 to 4, (i.e.
number 3) Thus
AdjustMeter(1,100,75,1,4) = 3
An error occurs if ValueMeter1 is not in range. The following
must always hold:
StartMeter1 <= ValueMeter1 <= EndMeter1
StartMeter2 < EndMeter2
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson