Nikos Alexandris:

> Updated in sandbox, see: https://trac.osgeo.org/grass/changeset/69365
> Is it though correct?

Vaclav Petras wrote:

I was not looking at the logic but

if (hue == -1.0) {

is not safe. Although it will probably work most of the time if you set it
to the exactly same value (`hue = -1;`),

Glynn Clements <gl...@gclements.plus.com> [2016-09-05 16:46:31 +0100]:

There's no "probably" about it. If you execute "hue = -1;", a
subsequent "if (hue == -1)" comparison *will* succeed.

Rounding error only occurs when the correct result isn't exactly
representable, which isn't the case here. It doesn't occur randomly.

If using -1 is good, it seems simpler (to me, the ignorant) than trying
introducing yet another boolean flag.

Nikos
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to