Type conversion (float -> int)
-
This is perhaps a silly question but looking at the documentation and trying with some sample code didn't work..
I would need to convert the result of an expression which result is float to an integer (e.g. truncated decimal or possibly roundup of it).
Is there a way to do so ?
I tried with int(expression) but it didn't work
thanks in advance
-
-
@chrishamm said in Type conversion (float -> int):
yes sorry...i'm blind LOL
floor(expression) made it happen
Thanks