Quick, stupid question about the round() function.

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
Canadian Pirate
Kobold
Posts: 18
Joined: Thu Dec 17, 2009 9:04 pm

Quick, stupid question about the round() function.

Post by Canadian Pirate »

Yeah, this is really stupid, but is it possible to make it round down, instead of up? I tried rounddown(), which didn't do anything, round down() which caused an infinite error loop, and roundd() which didn't do anything either <_<. I'm sure it's something simple I'm missing.

User avatar
mfrizzell
Dragon
Posts: 762
Joined: Sat Feb 13, 2010 2:35 am
Location: California

Re: Quick, stupid question about the round() function.

Post by mfrizzell »

Check out the Wiki, it shows examples of rounding down.

http://lmwcs.com/rptools/wiki/round
DCI/RPGA# 7208328396 Skype ID mfrizzell77
Characters:
Strabor - Dwarf Avenger 5th Level
Tikkanan - Human Warlock 2nd Level
----------------------------------------------------
"People are more violently opposed to fur than leather because it's safer to harass rich women than motorcycle gangs."

User avatar
biodude
Dragon
Posts: 444
Joined: Sun Jun 15, 2008 2:40 pm
Location: Montréal, QC

Re: Quick, stupid question about the round() function.

Post by biodude »

Do you want to round to the nearest integer, or a decimal place?
see Wiki: floor(), and Wiki: ceiling() for other rounding functions.
"The trouble with communicating is believing you have achieved it"
[ d20 StatBlock Importer ] [ Batch Edit Macros ] [ Canned Speech UI ] [ Lib: Math ]

Canadian Pirate
Kobold
Posts: 18
Joined: Thu Dec 17, 2009 9:04 pm

Re: Quick, stupid question about the round() function.

Post by Canadian Pirate »

Ah, the floor function. That works perfectly, thank you!

Post Reply

Return to “MapTool”