From c60408eea2fcbab40e79d11f0a79691dd49a4a87 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 13 Jul 2011 21:12:47 +0200 Subject: Avoid more histogram silliness --- src/scaling-report.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/scaling-report.c') diff --git a/src/scaling-report.c b/src/scaling-report.c index 2cfafd09..70bc78ad 100644 --- a/src/scaling-report.c +++ b/src/scaling-report.c @@ -418,17 +418,21 @@ static void scale_factor_histogram(cairo_t *cr, const struct image *images, } } - /* Count the number of bins with no counts, subtract 1 from - * the maximum value until this isn't the case */ n_zero = 0; n_half = 0; - for ( b=0; b 10.0 ) { - if ( n_zero > n_half ) osf_max -= 1.0; + /* Count the number of bins with no counts, subtract 1 + * from the maximum value until this isn't the case */ + for ( b=0; b n_half ) osf_max -= 1.0; + + } } while ( n_zero > n_half ); -- cgit v1.2.3