The above is using the cosine formula which has been rearranged to solve for the angle.PHP Code:BeforeInverse= ((2nd.Text ^2 + 3rd.Text ^ 2 - 1st.Text ^ 2) / (2 * 2nd.Text * 3rd.Text))
Calculation.Text = Math.Acos(BeforeInverse/ Math.PI * 180)
When i calculate, it comes up with NaN and i'm not dividing by 0. What does NaN mean and is there an error with the above code?




Reply With Quote