comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: ROT is ROTTEN (a solution)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: ROT is ROTTEN (a solution) [message #28160 is a reply to message #28075] Wed, 21 November 2001 12:59 Go to previous messageGo to previous message
Martin Downing is currently offline  Martin Downing
Messages: 136
Registered: September 1998
Senior Member
"William Thompson" <thompson@orpheus.nascom.nasa.gov> wrote in message
news:9tgojk$g7t$1@skates.gsfc.nasa.gov...
> "Martin Downing" <martin.downing@ntlworld.com> writes:
>
>> Hi All,
>
>> This was an interesting problem - I certainly hadn't noticed it before.
The
>> reason for the behaviour is precision error in the arithmatic which works
>> out the poly2d coefficients. It can be corrected effectively by modifying
>> line 128 of rot.pro:
>
>> from:
>
>> theta = -angle/!radeg ;angle in degrees CLOCKWISE.
>
>> to:
>
>> theta = (-angle MOD 360) *acos(0.0d)/90 ;angle in degrees CLOCKWISE.
(mod
>> MRD 21/11/2001 to correct for precision error)
>
> As others have said, great job! Can I make one small suggestion, though.
> Instead of acos(0.0d)/90, can I suggest !dpi/180?
>
> theta = (-angle MOD 360) * !dpi/180
>

Sure, it just seemed kind of fun the other way!

Martin
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Time on My Hands
Next Topic: Event Handling

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:11:15 PDT 2025

Total time taken to generate the page: 0.00198 seconds