Not sure this is working correctly or I am misunderstanding…?
Using the following code
A = 11 MOD 2
RETURN A AS \"A\"
The return value of A is 1 but actual result of the calculation 11/2= 5.5 so A should be 5 I think?
And then the following code
A = 2 MOD 11
RETURN A AS \"A\"
The return value is 2 which seems correct if only working to one decimal place – actual result = 0.1818
Dividing 11 by 2, give you the max round number possible of 5. So the remainder of this division is 1.
Dividing 2 by 11 is not possible, so the remainder is 2.
So it is me not understanding 🙂 and it is not working how I thought it would (was hoping to use it as part of an alternative method for ‘floor’/round down) but many thanks for the help!
I made some calculation in this video to floor number to round one: https://www.prorealcode.com/blog/video-tutorials/trading-des-chiffres-ronds-grace-a-probuilder/
(sorry it’s in French).
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue
Not sure this is working correctly or I am misunderstanding…?
Using the following code
A = 11 MOD 2
RETURN A AS \"A\"
The return value of A is 1 but actual result of the calculation 11/2= 5.5 so A should be 5 I think?
And then the following code
A = 2 MOD 11
RETURN A AS \"A\"
The return value is 2 which seems correct if only working to one decimal place – actual result = 0.1818
Dividing 11 by 2, give you the max round number possible of 5. So the remainder of this division is 1.
Dividing 2 by 11 is not possible, so the remainder is 2.
So it is me not understanding 🙂 and it is not working how I thought it would (was hoping to use it as part of an alternative method for ‘floor’/round down) but many thanks for the help!
I made some calculation in this video to floor number to round one: https://www.prorealcode.com/blog/video-tutorials/trading-des-chiffres-ronds-grace-a-probuilder/
(sorry it’s in French).