Re: Color differences

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

Pete Lomax 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
> 

this works. i found out now that none of those colof difference functions are
accurate enough.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu