SRL Archive - OSR Help

ArcTan2


mormonman

2011-08-27 06:37:00

Anybody got the ArcTan2 source?

Wizzup?

2011-08-27 06:53:50

From the open source FPC, although I'm not completely sure this is the proper function:

{$ifndef FPC_MATH_HAS_ARCTAN2}
function arctan2(y,x : float) : float;
begin
if (x=0) then
begin
if y=0 then
arctan2:=0.0
else if y>0 then
arctan2:=pi/2
else if y<0 then
arctan2:=-pi/2;
end
else
ArcTan2:=ArcTan(y/x);
if x<0.0 then
ArcTan2:=ArcTan2+pi;
if ArcTan2>pi then
ArcTan2:=ArcTan2-2*pi;
end;
{$endif FPC_MATH_HAS_ARCTAN2}

What do you need it for?

mormonman

2011-08-27 17:34:49

I just wanted to see if it did what I thought it did. I guess I should have looked through FPC, when I didn't find it in simba.

Wizzup?

2011-08-27 17:37:17

From: mormonman
I just wanted to see if it did what I thought it did. I guess I should have looked through FPC, when I didn't find it in simba.


Well, technically you could probably find a reference to it in Simba, as we just export the FPC function. :) GNU grep is your friend.

I suppose it would be helpful to have some documentation on functions like these as well.

Wanted

2011-08-27 19:21:41

http://en.wikipedia.org/wiki/Atan2

mormonman

2011-08-27 20:13:28

Ok so I ported all of this to Scar:Titan, and I can't get FilterPointsPie to return anything besides a large array of (0, 0).

Wizzup?

2011-08-28 05:26:25

Remember that Wizzyplugin and Simba are GNU GPL licensed. You can't just rip the code without also using the GNU GPL in all your code. (Which means open sourcing it) The same goes for FPC's code. Unless you get explicit permission of course.

As for your problem, I don't think I can help, you probably just ported it wrong…? Recall that ArcTan2 is nothing more than ArcTan with a simple exception.

mormonman

2011-08-28 06:20:55

From: Wizzup?
Remember that Wizzyplugin and Simba are GNU GPL licensed. You can't just rip the code without also using the GNU GPL in all your code. (Which means open sourcing it) The same goes for FPC's code. Unless you get explicit permission of course.

As for your problem, I don't think I can help, you probably just ported it wrong…? Recall that ArcTan2 is nothing more than ArcTan with a simple exception.


I'm just using it for testing purposes, not releasing it. So there won't be any problems with that. It's kind of just a personal project. If it was ever released of course it would be open source and licensed. I have no reason not to do that. I couldn't find the root of the problem, so I solved it by using another method…although it wouldn't be too hard to just import the wizzyplugin. This may come off as a bit rude, but I really don't see what your problem is with scar or freddy. Open source can't mean so much to you that anytime you see someone mention scar you must instantly throw some anti comments in there. It has to be something else besides that. *Please to not go off on me, I'm just a little curious as to the reasons*

Wizzup?

2011-08-28 06:35:04

From: mormonman
I'm just using it for testing purposes, not releasing it. So there won't be any problems with that. It's kind of just a personal project. If it was ever released of course it would be open source and licensed. I have no reason not to do that. I couldn't find the root of the problem, so I solved it by using another method…although it wouldn't be too hard to just import the wizzyplugin. This may come off as a bit rude, but I really don't see what your problem is with scar or freddy. Open source can't mean so much to you that anytime you see someone mention scar you must instantly throw some anti comments in there. It has to be something else besides that. *Please to not go off on me, I'm just a little curious as to the reasons*


Anti comments? You mean my remarks over the GPL? I don't think I attacked anyone here, I just assumed that since you were working in a closed ecosystem you might want to release a closed source product, I just warned you of the GPL so you wouldn't be upset later.

I don't always ``throw anti comments'' in threads, I usually only comment if people are doing exactly the opposite - anti comments for Simba, in which case I point them at their logical flaws. If you want to have a chat about open source and my views on that, feel free to contact me on IRC.

But as you said,
From: mormonman

If it was ever released of course it would be open source and licensed. I have no reason not to do that.


Of course you don't have a reason to do that; you have nothing to hide, eh. :)

Echo_

2011-08-28 09:18:13

From: Wizzup?
I don't always ``throw anti comments'' in threads, I usually only comment if people are doing exactly the opposite - anti comments for Simba, in which case I point them at their logical flaws.


I agree with mormonman on this issue. In fact, I'll go find an anticomment as an example right now.

E: Here's one from the SCAR section:

From: Wizzup?
In Simba, you can use script settings. (They write XML to the settings.xml)
Support for SQLite or similar is planned. Or you can write to INI files.


From: Freddy1990
But has no relevance since the question was about SCAR.


Which isn't exactly fair since Freddy never goes into Simba question threads and posts the working alternative in SCAR.

Wizzup?

2011-08-28 09:57:00

From: Echo_
I agree with mormonman on this issue. In fact, I'll go find an anticomment as an example right now.

E: Here's one from the SCAR section:

Which isn't exactly fair since Freddy never goes into Simba question threads and posts the working alternative in SCAR.


Aside from that fact that SRL is my community, SRL is now a Simba community and Freddy has his own half-assed community, that is probably one of the few examples where I stepped out of line, and I was well ``punished'' for that by having to bear such a cocky reply.

As you can see I didn't even bother replying. Good job finding that one post, though. Now find the tons of other posts where I only replied as a reaction to stupid comments by those I will not name.

My post is still quite helpful, though. Unless you didn't know that SCAR can write to INI files as well. To be honest, I find it quite pathetic that I even bother to defend myself here.


Mormonman:
Freddy played a game with the SRL council/staff/devs (before he even knew about Simba) - a dangerous game - and he lost, utterly and completely. He's just a sour and bad loser here now. Him coming back to SRL now only shows how little support he actually receives because he pissed off nearly everyone influential. He needs SRL because he can't get his community together.

Sure, some people feel sorry for him (which I understand if you're an outsider and want everyone to be ``nice to eachother''), I don't. I've been through enough crap caused by him. If he wants to actually work with us as a team, he's welcome. Not in any other way. I'm a nice guy, until you piss me off. I've been plenty helpful towards SCAR and development in the past - and all I got was crap. So as a consequence Simba came into existence (and not just due to my contributions - due to the work of many!). (That and SCAR becoming/being really unstable at the time)

Hopefully this satisfies your little curiosity. Next time contact me in private. I don't require a reaction, so I'm locking this. If you want the thread about ArcTan2 to continue, make a new one. If you want to discuss this post with me, I suggest you do it in private on IRC.