Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Problem with the "ceil" and "floor" functions not functionning properly

I'm trying to do the following: [[floor(((7 +6)/2)d6)]] It always gives me 7 dice instead of 6 (7+6=13)/2=6 (if round down) 7 (round up) However if I remove the "d6" from the equation like this: [[floor(((7 +6)/2))]] it gives me a result of 6 If I put the "ceil" command like so [[ceil(((7 +6)/2))]] it gives me 7 dice. As soon as I add dices in the formula it seems to always round the number up.
1403720026

Edited 1403720051
Gauss
Forum Champion
Floor is done after rolling. <a href="https://wiki.roll20.net/Dice_Reference#Order_of_Op" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Order_of_Op</a>... Due to that the dice roll is being interpreted as ((7+6)/2)d6 which results in 7d6 (13/2 is rounded up to 7 automatically when applied to dice rolls). You need to use the following: /r [[floor((7+6)/2)]]d6