Announcement

Collapse
No announcement yet.

Negatively round decimals

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Negatively round decimals

    First of all hi everyone, since this is my first post on this forum !

    Secondly, I have a problem which is causing me some headache, and I really hope someone can help me with this.

    I'm currently trying to create a form-fillable document ( a Dungeons and Dragons Character Sheet, to be specific. Yup, I know, I'm a total nerd ) and I find that the User Interface is quite simple and intuitive and I had no problem whatsoever up until now.

    As I want the form to be completely automatic, meaning that, if I enter a value that affects other fields I want those fields to actually calculate their value, I needed to apply some math to quite a bunch of boxes. Problem is, I need the form to "hide" the decimals : i found a workaround for this problem, which is to select the text box and go to its properties, go to "format", selecting the "number" option and allowing 0 decimals. Problem is, that option actually doesn't truncate the decimals, but it just rounds them up to the nearest ten.

    As all of the calculations give either whole numbers or *.5 numbers, with this method the calculations for lots of important forms simply don't work the right way, giving "false" results.
    I need some way to make the form completely ignore decimals or either round the results negatively ( eg : a 3.5 would become a 3 ).

    Hope someone can help me with this as I really can't find a solution ( even tried JavaScript, but it's not my forte : still willing to go that way if it's the only one and if someone has the patience to explain me or to help me compile a little code ) !

    Also, sorry if some parts of the thread are not clear : English isn't my native language and I always fear I might mess up.

    Thanks in advance.
Working...
X