rounding down

I want to create a character sheet that fills in the Ability Score Modifiers automatically so I have str.Value/2-5 this does not always return a whole number. is my str is 15 then i have 15/2-5=2.5. what command do i enter to get 2 instead of 2.5 that will not affect even numbers entered in str? the sheet is attached.

Comments

  • Its JavaScript, so to round the value, use something like:
    Math.round( Edit1.Text);
    

Leave a Comment