Re: Color differences

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

Christian Cuvier wrote:
> 
> I assume you'll find retty much wht you're looking for there:
> 
> <a
> href="http://www.brucelindbloom.com/index.html?ColorDifferenceCalc.html">http://www.brucelindbloom.com/index.html?ColorDifferenceCalc.html</a>


that's just too complicated to be useful. both calculator to use (doesnt work)
and those math formulas to convert to code. thanks anyway.

i found this pascal code:
http://www.colorpro.com/info/software/heggie.html
the problem with it is that it seems code is a little mangled. 

did i translate this funciton correct:

function geth(a, b : double) : double;
begin
  if (a=0) and (b=0) then geth := 0;
  if (a=0) and (b>0) then geth := 90;
if (a=0) and (b<0) then geth :="270;" if (b="0)" and (a<0 ) then geth :="180;"
  if (b="0)" and (a>0) then geth := 0;
  if (a0) and (b0) then
  begin
    geth := 360+(arctan(b/a)*180/pi);
if a<0 then geth :="180+(arctan(b/a)*180/pi);" if (a>0) and (b>0) then
    geth:= arctan(b/a)*180/pi;
  end;
end;

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

sometimes my translated eu function complaints that no value is returned from
function.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu