Linear - method of object Pm

Description:
Obtains the functional value (or the argument) of the linear function that is defined by the [x1,fx1] and [x2, fx2] points.
Syntax:
Linear(Val As Double, x1 As Double, x2 As Double, fx1 As Double, fx2 As Double, Attr As Long) As Double
Calling:
`n = Pm.Linear(Val, x1, x2, fx1, fx2, Attr)`
Parameters:
Val (Double) argument for which the functional value is determined (Double) first point argument of the linear function (Double) second point argument of the linear function (Double) functional value of the first point argument (Double) functional value of the second point argument (Long) The calculation attribute0 - Val is the value of the argument, the method returns the functional value. If Val < x1, then returns fx1 If Val > x2, then returns fx2 Else returns the functional value of the linear function1 - Val is the functional value, the method returns the argument. If the Val is outside the (fx1, fx2) interval, then the returned value is x1 or x2.2 - Val if the value of the argumentu, the method returns the functional value. The function is linear in the whole definition scope.3 - Val is the functional value, the method returns the argument. The function is linear in the whole definition scope.
Note:
The method can also be called in the graphic item events for Web panels.

The method is functional also in Macro expression \$.expr and in the onDraw event of the PmiCanvas graphic item.

`var fx = Pm.Linear(0.5, 0, 1, 4, 5, 2);  //Value 4.5. will be in the fx variable`