Vaclav Petras wrote: > > Updated in sandbox, see: https://trac.osgeo.org/grass/changeset/69365 > > > > Is it though correct? > > > > 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;`),
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. -- Glynn Clements <gl...@gclements.plus.com> _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev