Be careful about the angles

来源:互联网 发布:化妆品正品查询知乎 编辑:程序博客网 时间:2024/06/05 16:12

Yesterday, when I tried to improve my program following my supervisor’s suggestions, I wrote lines of codes which just calculated the position of an object. And this kind of things I have done for many times in this program. But when I test it. All the time I got a really mass picture in which the objects are wrongly positioned. No other reasons could be. However, after many times’ verifications, checking and re-analyzing. I could find nothing goes wrong!

Till the time to go back, I still haven’t got what is wrong with my program. Having English classes this morning, my thought came to this problem again in the class then quickly went back to the class. After lunch, open my computer, check emails, see whether there are something interesting or not and then come back to my program.

Try several ways again. No progress. Suddenly, when I focus on the mass picture the wrong program creates, I found maybe it’s the angle or the sign which is wrong. Next read the program, Gosh! I have not change the degree format of the angle to radius format before I use the built-in Mathematical  functions!

Why I am that careless! Do be careful when using angles in your program. Make sure the format of the angle is exactly right!

原创粉丝点击