mostafa mahmoud
asked on
COSIEN IS NOT WORKING ON MY CODE
WHEN I USED THIS CODE
AND THIS ELSE IF IS IN EQUAL BUTTON FUNCTION
AND WHN I WRITE NUMBER 30 AND PRESS ON COS BUTTON IT GIVE ME 0.154251449887584
ElseIf operation = 8 Then
TextBox1.Text = Math.Cos(fo)
"FO "IS THE FRIST NUMPER TO WRITEAND THIS ELSE IF IS IN EQUAL BUTTON FUNCTION
AND WHN I WRITE NUMBER 30 AND PRESS ON COS BUTTON IT GIVE ME 0.154251449887584
' calculate cosine with angle in degrees
Private Function Cosd(angle As Double) As Double
Return Math.Cos(Rad(angle))
End Function
' calculate sine with angle in degrees
Private Function Sind(angle As Double) As Double
Return Math.Sin(Rad(angle))
End Function
' convert degrees to radians
Private Function Rad(degrees As Double) As Double
Return Math.PI * degrees / 180
End Function
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
1 Radian is 57.2958 degrees.