David Culp:
One thing I maybe should add to the doc is that the order of operation is always: 1. scale (multiplication) 2. offset (addition) 3. truncate (truncation) This will matter when, for instance, converting from Fahrenheit to Celsius. The normal formula is C = (F - 32) * 0.55555556. The operator precedence above requires a new formula, C = (F * 0.555555556) - 17.777777777.
This commit is contained in:
parent
f8c23e13c3
commit
3176a4676d
1 changed files with 4 additions and 1 deletions
|
@ -580,7 +580,10 @@ This example is a switch that contains both static and dynamic text:
|
|||
</pre>
|
||||
<br>
|
||||
Note that the value to be displayed can be modified using <scale> for multiplication,
|
||||
<offset> for addition, and <truncate>true</truncate> for truncation.
|
||||
<offset> for addition, and <truncate>true</truncate> for truncation. The order of
|
||||
operation is always scale-offset-truncation, which may require you to adapt your formula. For instance, the
|
||||
normal conversion from Fahrenheit to Celsius would be C = (F-32)*0.555555556. Because of the order
|
||||
of operation above you must use the formula C = (F*0.55555556)-17.77777777.
|
||||
<br>
|
||||
|
||||
<HR WIDTH="20%">
|
||||
|
|
Loading…
Reference in a new issue