1. Re: Color differences
- Posted by Tone Škoda <tskoda at email.si> Oct 01, 2004
- 451 views
- Last edited Oct 02, 2004
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.