Author
i finish building the fuction but in certain cases..
johny doe
Ranch Hand
Joined: Dec 07, 2007
Posts: 78
posted Dec 21, 2007 02:32:00
0
it works in all cases exept when i tried to rotate the point (0,1) around the point (0,0) 180 degrees clock wise instead of giving me the value(0,-1) it gives me 6.123233995736766E-17,-1.0 when i tried to rotate the point (0,1) around the point (0,0) 270 degrees clock wise instead of giving me the value(-1,0) it gives me -1.0,-1.2246467991473532E-16 when i tried to rotate the point (0,1) around the point (0,0) 0 degrees clock wise instead of giving me the value(0,1) it gives me 6.123233995736766E-17,1.0 i dont know what this E number means i dont know why it happening??
johny doe
Ranch Hand
Joined: Dec 07, 2007
Posts: 78
posted Dec 21, 2007 02:37:00
0
the right pos is the top one i dont know how to edit a post
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
posted Dec 21, 2007 03:04:00
0
No idea what this function is you are talking about, but my guess is you are witnessing the accuracy problems you encounted doing floating point calculations. Or perhaps your logic is just wrong. [ December 21, 2007: Message edited by: Paul Sturrock ]
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Akhilesh Trivedi
Ranch Hand
Joined: Jun 22, 2005
Posts: 1493
posted Dec 21, 2007 03:23:00
0
Originally posted by johny doe: the right pos is the top one i dont know how to edit a post
Simple, Click the edit icon (the one with pencil and paper) on your post. [ December 21, 2007: Message edited by: Akhilesh Trivedi ]
Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs ] [Certification Guides ] [The Linux Documentation Project ]
Bill Shirley
Ranch Hand
Joined: Nov 08, 2007
Posts: 457
posted Dec 21, 2007 12:39:00
0
Note: this is a continuance of a previous thread . "Johny Doe", you should 1) keep one discussion in one thread http://faq.javaranch.com/java/UseOneThreadPerQuestion 2) use useful titles http://faq.javaranch.com/java/UseAMeaningfulSubjectLine
Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ );
subject: i finish building the fuction but in certain cases..