Thanks for your time and patience.
I wrote a program to calculate Cosine, Sin, Tangent.
However, by using the built in math() which are Math.Cos, Math.Sin and Math.Tan
It gives inaccurate readings. By default, the math() accepts and calculates in radian form.
I had properly converted user inputs into degree by
Math.PI * (userInput / 180)
The problem I faced are as follows :
When using Math.Cos(x)
Example : where x can be 90,270,450,630 'should give you a 0.
But, they gave me a funny value instead.
When using Math.Tan(x)
Example: where x can be 90,270,450 'should give you an error
Example: where x can be 180,360,540 'should give you 0
But, they gave me a different value
When using Math.Sin(x)
if example x is 180,360 'should give you 0
However, the function do not calculate it accurately.
I used Windows Calculator as a reference.
Can somehow suggest or help on this? Not by hard-coding but by logic?
Thanks for your kind attention.;)