title: How to convert a degrees calculation to radians? (Kawa to Java)
body: <p>I have tried to convert a calculation from an app I made using MIT AppInventor which uses Kawa to Android using Java.The problem I'm facing is that the trigonometric parts of the calculation in Kawa are using degress.My question is how do I translate this calculation to Java and get the same output? </p>
  
  <p>This is how I do the calculation is Kawa,all variables are of type double:</p>
  
  <pre><code> Tri 1=atan(Offset Depth/Offset Length)
   Mark 1=sqrt(Offset Length^2+Offset Depth^2)
   Tri 2=(180-Tri1)/2
   Mark 2=Duct Depth/(tan(Tri 2))
  </code></pre>
  
  <p>Then I did my best to translate it to Java code,the variables are double also as above,depth,length and duct depth are user input values.</p>
  
  <pre><code> tri1 = Math.atan(offsetDepth / offsetLength);
   marking1 = Math.sqrt(Math.pow(offsetLength,2) + Math.pow(offsetDepth,2));  
   tri2 = (180 - tri1) / 2;
   marking2 = ductDepth / Math.tan(tri2);
  </code></pre>
  
  <p>Screenshot of what the inputs and outputs look like:</p>
  
  <p><img src="https://i.stack.imgur.com/dIS4K.png" alt="enter image description here"></p>