Quick question guys, how do you convert a number with decimal points to an integer, for example:
197.01015202268 to 197.
The only way’s I can figure out to do it is:
Use % (modulo) to give me a remainder of the value and then take the value from the original number, or,
Convert the value to a string, look for the . (fullstop), take out the numbers before it and then convert back to number value. Which is a bit of a long way round.
I’ve had a look through the math.functions in the API but none seem to be relevant as I’m not passing any arguments and I don’t want to round off the decimals, I just need the integer.
Is there a simple and easy solution to this, or is it just that I can’t see the wood for the tree’s?
Also code would be nice, (if its needed)