3 Replies Latest reply on Dec 30, 2011 12:27 PM by Ned Murphy

    how to round decimal point to two places

    envisionmarketing

       

      Hi all, I have been tasked with creating a custom "calculator" for a client that uses a specific equation. The client inputs data into two Input Text fields and the result shows up in a dynamic text field. Is there any way I can limit the number of decimal places to two? Here is my code (which works, except for the decimal issue):

       

       

      function onCalculate()
      {
      one = Number(number_one);
      two = Number(number_two);
      result_1 = ((one / 4) * (65 / (1 - 0.25))) + ((two / 0.5) * (65 / (1 - 0.25)));
      }

       

      Thanks in advance!!!!