Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6
Look up "Taylor Series of Cosine and Sine". With those equations you will be able to calculate cos and sin without using the Math object and without cos() and sin(). However, the range in which this will work is limited. Nevertheless a trick can be done to get away with around 5 or 6 terms, which is not that much. Take a look at this example I made in python (the input must be an integer or float number, you must type Pi manually if you want to use it, or change the code at the 3rd line). https://code.sololearn.com/cDhvNP6Wr07F/?ref=app
23rd Feb 2019, 9:03 PM
Zokalyx
Zokalyx - avatar
+ 2
https://code.sololearn.com/cVsI16F72cau
23rd Feb 2019, 9:29 PM
Андрей Чачин, Andrew Chachin
Андрей Чачин, Andrew Chachin - avatar