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

math question

I'm hoping that someone can point me in the right direction here. [[.5*@{Pelgar the Rolling Boulder|repeating_skills_-KdXH8FmZazld1L0q5EE_level}+4]] so in GURPS parry is formulated as skilll divided by 2 and then add 3 drop fractions. The above is working as intended but I can't get it to drop the fraction at the end. I'm trying to remove the .5 in the above image.
1499104040
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Wrap your math in the Floor() function. That will round down: [[floor(.5*@{Pelgar the Rolling Boulder|repeating_skills_-KdXH8FmZazld1L0q5EE_level})+4]]
awesome! thanks so much I was digging all over the net for that!
1499105543
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Excellent!  In case you ever need it, the companion function ceiling() rounds up to the nearest integer.
1499114438
Lithl
Pro
Sheet Author
API Scripter
keithcurtis said: Excellent!  In case you ever need it, the companion function ceiling() rounds up to the nearest integer. And round() to the nearest whole number (rounding up at .5), and abs() to turn a negative value into a positive.
awesome, thanks alot guys!