Quantcast
Channel: flespi forum
Viewing all articles
Browse latest Browse all 881

Rounding data in PVM code plugin

$
0
0

Thanks, not sure why the PVM generator suggested the 2 options that don't work?

Also, I assume the reason why you divide by 100.0 (instead of 100) is to ensure it doesn't do integer division when the numerator rounds to an integer? I tested and it seemed like as long as temperature is float,, math.round will produce a float, even if rounded to integer. If temperature is integer, the multiplication and integer division will still produce the correct result. But maybe you want to ensure the result is stored as float?


Viewing all articles
Browse latest Browse all 881

Trending Articles