# Linear - method of object Pm

###### Description:
Getting 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) attribute of the calculation0 - Val is the value of the argument, the method returns the functional value. If Val < x1, then the returned value is fx1 If Val > x2, then the returned value is fx2 Else the returned value is 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, than 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.

`Dim fx`
`fx = Pm.Linear(0.5, 0, 1, 4, 5, 2)`