Val | (Double) Argument for which the functional value is determined |
---|---|
x1 | (Double) First point argument of the linear function |
x2 | (Double) Second point argument of the linear function |
fx1 | (Double) Functional value of the first point argument |
fx2 | (Double) Functional value of the second point argument |
Attr | (Long) The calculation attribute
0 - 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
Otherwise returns the functional value of the linear function 1 - Val is the functional value, the method returns the argument. If the Val is outside the (fx1, fx2) interval, then the return 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. |
var fx = Pm.Linear(0.5, 0, 1, 4, 5, 2);
// The 4.5 value will be in the fx variable