Virtuino Forum
Function Int in math script. - Printable Version

+- Virtuino Forum (https://virtuino.com/forum)
+-- Forum: Virtuino (https://virtuino.com/forum/forumdisplay.php?fid=1)
+--- Forum: Virtuino IoT (https://virtuino.com/forum/forumdisplay.php?fid=2)
+--- Thread: Function Int in math script. (/showthread.php?tid=1009)



Function Int in math script. - JCJunior - 08-09-2022

Good evening, 

Is there any way to get the integer value of a division in the math script?

Ex. int(5/2)=2


RE: Function Int in math script. - iliaslamprou - 08-11-2022

Hi,
the math script doesn't contain the "INT" function
You can use the floor(x) function to convert the positive double values  to int,
or the ceil(x) function for the negative values.
I can't add an Integer converter to the math script 
I have added (ver 0.0.16)  an integer converter to the script Min-Max-Avg...
you can use this script after the math script.

I have found some bugs in the math script. I have fix them now.
You have to update to the version 0.0.16

I'm trying for the best. It's not always that simple