Gamestudio Links
Zorro Links
Newest Posts
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 8,812 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
MaliceTheMaker, Haitao_Ren, JimSimons, julienp, julienper
19248 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
missing atan2 function #156441
09/23/07 08:06
09/23/07 08:06
Joined: Oct 2006
Posts: 106
i_program_games Offline OP
Member
i_program_games  Offline OP
Member

Joined: Oct 2006
Posts: 106
Here is an atan2 function till the one mentioned in the documentation shows up.

function atan2(var nY,var nX)
{
var nPI = 180;

if(nX > 0)//first or forth quadrent
{
return(atan(nY/nX));
}

if(nX<0)//second or third quadrent
{
if(nY>=0)//second quadrent
{
return(atan(nY/nX)+nPI);
}
else //y<0 //third quadrant
{
return(abs(atan(nY/nX))+nPI);
}

}
else //x=0;
{
if(nY>0)
{
return(nPI/2);
}

if(nY<0)
{
return(-(nPI/2));
}
else //y=0
{
//undefined
}
}

}


Chaos is a paradox consistently inconsistent.
Re: missing atan2 function [Re: i_program_games] #156442
09/23/07 11:37
09/23/07 11:37
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Quote:

Here is an atan2 function till the one mentioned in the documentation shows up.



it has, its called "atan2v", but i haven't done much with it.
it didn't seem to work, though, when i just tried to use it to replace my atan2.

still, good onya

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: missing atan2 function [Re: JibbSmart] #156443
09/23/07 16:41
09/23/07 16:41
Joined: Oct 2006
Posts: 106
i_program_games Offline OP
Member
i_program_games  Offline OP
Member

Joined: Oct 2006
Posts: 106
Ah, thanks for letting me know


Chaos is a paradox consistently inconsistent.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1