POV-Ray : Newsgroups : povray.newusers : Calculation errors Server Time27 Sep 2023 08:20:25 EDT (-0400)
 Calculation errors (Message 1 to 4 of 4)
 From: kurtz le pirate Subject: Calculation errors Date: 14 Sep 2023 11:23:06 Message: <6503255a\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#6503255a%241%40news.povray.org",
"dateCreated": "2023-09-14T15:23:06+00:00",
"datePublished": "2023-09-14T15:23:06+00:00",
"author": {
"@type": "Person",
"name": "kurtz le pirate"
}
}
Hello,

I'm trying to adapt an Excel spreadsheet in POV. I've got a strange problem.

In Excel
Cell E19 = 280.8191102;
Cell E20 = 23.43825611;
Cell E21 = DEGRES ( ATAN2 ( COS(RADIANS(E19));

E21 = -78.23396726

In POV
#declare E19 = 280.8191102;
#declare E20 = 23.43825611;

RESULT = 168.233967

No obvious relationship between this -78.2 and +168.2
How to explain this difference ?

Especially since the correct value is -78.2 or 281.7 !
(Note that the numbers after the decimal point are exactly the same.)

Are the origins of angles and rotation direction in Excel and POV
different ?

help apprecied

--
Kurtz le pirate
Compagnie de la Banquise
```
 From: Bald Eagle Subject: Re: Calculation errors Date: 14 Sep 2023 13:55:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.65034844c7e7348b1f9dae3025979125%40news.povray.org",
"dateCreated": "2023-09-14T17:55:00+00:00",
"datePublished": "2023-09-14T17:55:00+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
kurtz le pirate <kur### [at] gmailcom> wrote:
> Hello,
>
> I'm trying to adapt an Excel spreadsheet in POV. I've got a strange problem.

Are you trying to do atan2 like sane people do?
Because the jackasses at Microsoft reversed the arguments.

https://news.povray.org/povray.binaries.images/message/%3C58f61085%40news.povray.org%3E/#%3C58f61085%40news.povray.org%
3E

-BW
```
 From: Droj Subject: Re: Calculation errors Date: 14 Sep 2023 14:30:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.65034fd6c7e7348b6848bf7f3b2af915%40news.povray.org",
"dateCreated": "2023-09-14T18:30:00+00:00",
"datePublished": "2023-09-14T18:30:00+00:00",
"author": {
"@type": "Person",
"name": "Droj"
}
}
"Bald Eagle" <cre### [at] netscapenet> wrote:
> kurtz le pirate <kur### [at] gmailcom> wrote:
> > Hello,
> >
> > I'm trying to adapt an Excel spreadsheet in POV. I've got a strange problem.
>
> Are you trying to do atan2 like sane people do?
> Because the jackasses at Microsoft reversed the arguments.
>
>
https://news.povray.org/povray.binaries.images/message/%3C58f61085%40news.povray.org%3E/#%3C58f61085%40news.povray.or
g%
> 3E
>
> -BW

Hi BE,

we had a similar problem a while ago with the tube-kind-of-thing:
'the atan2 mystery' and you found the right track.

But see what Povray 3.7 documentation uses:
<< 3.3.1.5.4 Functions
atan2(A,B)
Arc-tangent of (A/B). Returns the angle, measured in radians, whose tangent is
(A/B)....>>

So in your words and accepted by the rest of the world - except Microsoft - it

It's always good to have you around.

-Droj
```
 From: kurtz le pirate Subject: Re: Calculation errors Date: 15 Sep 2023 02:57:36 Message: <65040060@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#65040060%40news.povray.org",
"dateCreated": "2023-09-15T06:57:36+00:00",
"datePublished": "2023-09-15T06:57:36+00:00",
"author": {
"@type": "Person",
"name": "kurtz le pirate"
}
}
_
| )
| |
| |_____
/    (]__)
/    (]___)
/    (]___)
___(]_)
/
/
Thanks a lot guys !

Reading the docs we don't pay enough attention to these kinds of details
but it's really jackasses of Microsoft to reverse the arguments.

Microsoft always faithful to its stupidity...

--
Kurtz le pirate
Compagnie de la Banquise
```