I am trying to get the module of a division, or, be able to truncate a number, but I am not finding any solution. Any ideas?
to get the module of a division you can use de Mod call that you can find in the Verse.digest.verse.
I show you an explample of it:
The variable currentRound is an integer that represents the current round of my game, and i use this module to get if we are in a even or odd round.
2 Likes
Additionally, if you want to truncate, you could use one of those two functions
Floor<native><public>(Val:float)<varies><decides>:int
Int<native><public>(Val:float)<varies><decides>:int
I think the difference between the two is that Floor[]
would work differently on a negative number, not sure though
1 Like