Re: Color differences

new topic     » topic index » view thread      » older message » newer message

On Thu, 30 Sep 2004 17:35:33 -0700, Tone =8Akoda
<guest at RapidEuphoria.com> wrote:

>did i translate this funciton correct:

I don't think so. Try this (all versions completely untested).

function geth(atom a, atom b)
	if a=0 then
		if b=0 then return 0
		elsif b>0 then return 90 end if
		return 270	-- b<0
	elsif b=0 then
		if a<0 then return 180 end if
		return 0		-- a>0
	end if
	if a<0 then return 180+(arctan(b/a)*180/PI)
	elsif a>0 and b>0 then return arctan(b/a)*180/PI end if
	return 360+(arctan(b/a)*180/PI)
end function

HTH,
Pete

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu