title: Display value from Math.tan() in degrees?
body: <p>I'm learning programming for android and i made a calculator. The calculator is working fine but I'm having troubles with my sin, cos and tan formulas. I would like to display the values in degrees instead of radians. </p>
  
  <p>Here is the piece of code that applies to that.</p>
  
  <pre><code>btnTan.setOnClickListener(new Button.OnClickListener() {
          public void onClick(View v) {
              setValue(Double.toString(Math.tan(Double.parseDouble(txtCalc
                      .getText().toString()))));
          }
      });
  </code></pre>
  
  <p>And this is the function setValue</p>
  
  <pre><code>private void setValue(String value) {
      if (operator == 0)
          reset();
  
      if (readyToClear) {
          readyToClear = false;
      }
  
      txtCalc.setText(value);
      txtCalc.setSelection(value.length());
  
      hasChanged = true;
  }
  </code></pre>
  
  <p>I would like to have another buttons that would toggle between radians and degrees like the Iphone calculator.</p>
  
  <p>Thank you! </p>