Calling randomize_value with max value 359 instead of 360 to fix off by 1

2007-08-29  Jakub Friedl  <jfriedl@suse.cz>

	* plug-ins/common/scatter_hsv.c: Calling randomize_value with
	max value 359 instead of 360 to fix off by 1 error when wrapping
        around.


svn path=/trunk/; revision=23397
This commit is contained in:
Jakub Friedl 2007-08-29 13:35:53 +00:00 committed by Jakub Friedl
parent d32c7ca45f
commit f935d6bd7a
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-08-29 Jakub Friedl <jfriedl@suse.cz>
* plug-ins/common/scatter_hsv.c: Calling randomize_value with
max value 359 instead of 360 to fix off by 1 error when wrapping
around.
2007-08-29 Jakub Friedl <jfriedl@suse.cz>
* plug-ins/common/convmatrix.c: Removes the fprint function.

View File

@ -278,7 +278,7 @@ scatter_hsv_scatter (guchar *r,
gimp_rgb_to_hsv_int (&h, &s, &v);
if (VALS.hue_distance > 0)
h = randomize_value (h, 0, 360, TRUE, VALS.hue_distance);
h = randomize_value (h, 0, 359, TRUE, VALS.hue_distance);
if (VALS.saturation_distance > 0)
s = randomize_value (s, 0, 255, FALSE, VALS.saturation_distance);