šŸ˜²JavaScript has a bad mistakešŸ˜² | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 7

šŸ˜²JavaScript has a bad mistakešŸ˜²

These days.I make calculator ,but when I tried to use Math.sin(90) ,It hasn't been 1 . Even cos and tan šŸ˜žbut I need to use sine or cos ect.... Inside my workings, what can I do? The wrong from JavaScript or from my phone or from me. Although everybody knows about to sin 90 = 1 cos 60 = 0.5 In JavaScript another thing. Please If you have the answer tell me and If you know how can I use sin and cos into my calculator by JavaScript. Thank you šŸŒ¹šŸŒ¹šŸŒ¹

29th Jan 2019, 3:02 PM
Basel.Al_hajeri?.MBH()
Basel.Al_hajeri?.MBH() - avatar
5 Respostas
+ 11
You have to provide the parameter in radians, not degrees. Try: Math.sin(Math.PI)
29th Jan 2019, 3:13 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 4
Yes, I would try (Math.PI/2.0) for 90 and (Math.PI/3.0) for 60.
29th Jan 2019, 6:57 PM
Sonic
Sonic - avatar
+ 4
You need to convert the arguments to radians.
14th Feb 2019, 1:57 AM
šŸ‘‘ Prometheus šŸ‡øšŸ‡¬
šŸ‘‘ Prometheus šŸ‡øšŸ‡¬ - avatar
+ 3
You won't get answer until deleting other 3 same questions.
29th Jan 2019, 3:07 PM
Maneren
Maneren - avatar
+ 1
Good.
31st Jan 2019, 1:02 AM
OtƔvio
OtƔvio - avatar