aspose file tools*
The moose likes Java in General and the fly likes i finish building the fuction but in certain cases.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

i finish building the fuction but in certain cases..

johny doe
Ranch Hand

Joined: Dec 07, 2007
Posts: 78
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
the right pos is the top one
i dont know how to edit a post
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

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: 1511
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
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);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: i finish building the fuction but in certain cases..
 
Similar Threads
i finish building the fuction but in certain cases..
Rotate about origin
Picking With Java 3D
Rotating a buffered image
how do i rotate a point from a center point??