Thought this would be simple but doesn't seem so. How can I remove all numbers after the decimal point in an expression, or round down to 0 decimal places (which is the same result)
For instance I have an integer: 2903.99302
I want to remove everything after decimal place, so that it results in 2903
Can't find how to do this. Some ideas:
num = 2903.99302;
dec = num.search("."); // OR dec = num.find(".");
result = num.substr(0, dec);
or
num = 2903.99302;
result = num.rounddown(0);
or
num = 2903.99302;
result = num.toFixed(0);
Apparently AE can also use JavaScript in recent versions. I'm on version 2021 and it's not basic javascript functions aren't recognised so not sure if there's some weird syntax...