Hey,
Is there a simple way to return the integer value or round a value down? I cannot seem to find anything in the documentation, but please direct me if I have missed it!
Thanks,
David
Is below any help?
There is a also roundup and roundown
https://www.prorealcode.com/documentation/round/
Hey,
No, this does not work – you can see in the examples it takes 2.8 up to 3.0. I need to round down 2.8 down to 2.
I dont see a rounddown function in the documentation. Is there some integerPortion() or roundDown() function I am missing?
Thanks,
David
To ALWAYS round down you have to subtract 0.4 from any number, while adding 0.9 ALWAYS rounds up.
Edit:
To ALWAYS round down you have to subtract 0.5 from any number, while adding 0.4 ALWAYS rounds up.
Sorry, I am on my mobile and couldn’t check the correct values.
Yes, already was a solution posted in this thread. I was more so looking for documentation or pointing out that there should be some for this functionality.
Thanks though,
David
pointing out that there should be some for this functionality.
I agree … like under Help / ProBuilder Language Documentation ?
I’ll add Roberto code to the Snippet Library also as row 77.
Snippet Link Library
pdrhParticipant
Average
Should 0.4 or o.5 be subtracted . If a number is 1.999 and I want this to round down then I need to subtract 0.5 otherwise if I subtract 0.4 giving 1.599 which ROUND (1.499)=2
I want to use this to calculate a contract size using STATEGYPROFIT