|
Performs power factor conversion.
syntax
Math.PowerFactorTrans(
bForward,
val,
min,
max
[,type = 5]
[,bPercent = TRUE]
[,precision = -1]
)
Parameters
bForward
|
|
Type:
|
Boolean
|
|
TRUE - Convert raw value to power factor.
FALSE - Converts power factor to raw value.
|
val
|
|
Type:
|
Number
|
|
Original price.
|
min
|
|
Type:
|
Number
|
|
The minimum of the raw values.
|
max
|
|
Type:
|
Number
|
|
The maximum raw value.
|
type
|
|
Type:
|
Number
|
|
Conversion method (specify 0 or 5).
0: Power factor expressed as -0 to 1 to +0
5: Power factor expressed as -0.5 to 1 to +0.5
|
bPercent
|
|
Type:
|
Boolean
|
|
When TRUE, the power factor is expressed as a percentage.
|
precision
|
|
Type:
|
Number
|
|
Number of decimal points. When set to -1, the number of decimal points is not limited. Only valid when bForward is set to T.
|
Return Value
|
|
Type:
|
Number
|
|
The result value.
|
Explanation
Performs power factor conversion. If it is an array, it returns the power factor converted values of all elements as an array.
|
Example
When converting raw values that vary from 0 to 2000 into power factors expressed as -0 to 1 to +0
|
var powerfactorval = ::Math.PT(T, sourceval, 0, 2000);
|
When converting a power factor expressed as -0 to 1 to +0 into a raw value that varies from 0 to 2000
|
var sourceval = ::Math.PT(F, powerfactorval, 0, 2000);
|
|
Supported
reference
Math.Abs
Math.Ceil
Math.Floor
Math.Ave
Math.Sum
Math.Max
Math.Min
Math.Median
Math.Mode
Math.Random
Math.Log
Math.Log10
Math.Pow
Math.Sqrt
Math.Nthroots
Math.AddingUp
Math.StDev
Math.Correl
Math.LineSt
Math.Sin
Math.Cos
Math.Tan
Math.Asin
Math.Acos
Math.Atan
Math.Exp
Math.LinearTrans (Math.LT)
Math.PowerFactorTrans (Math.PT)
Math.Summary
Math.Round
|