From 8d51af2c9284d41b9b3e7a1bd82b818b30cf949e Mon Sep 17 00:00:00 2001 From: cignoni Date: Fri, 17 Jun 2005 00:54:55 +0000 Subject: [PATCH] Corrected small bug in SetRange (H was resized to n instead of n+1) --- vcg/math/histogram.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vcg/math/histogram.h b/vcg/math/histogram.h index 8ba839c6..ec890153 100644 --- a/vcg/math/histogram.h +++ b/vcg/math/histogram.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.9 2005/06/14 14:27:00 ganovelli +added include of algorithm + Revision 1.8 2005/06/10 14:59:39 cignoni Added include assert.h and cast to ScalarType for a pow in SetRange() function. @@ -120,7 +123,7 @@ void Histogram::SetRange(ScalarType _minv, ScalarType _maxv, int _n, { Clear(); minv=_minv;maxv=_maxv;n=_n; - H.resize(n); + H.resize(n+1); fill(H.begin(),H.end(),0); R.resize(n+1); double dlt=(maxv-minv);