Promotic
WikipediaLinkedInYoutubeTwitterFacebook

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
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) attribute of the calculation
0 - 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 function
1 - 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.

Example:
Dim fx
fx = Pm.Linear(0.5, 0, 1, 4, 5, 2)
Value 4.5. will be in the fx variable
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- Linear
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice