added another assert to histogram to avoid trash result...
This commit is contained in:
parent
7537b20933
commit
486475d4a3
|
@ -165,6 +165,7 @@ public:
|
||||||
|
|
||||||
ScalarType Percentile(ScalarType perc)
|
ScalarType Percentile(ScalarType perc)
|
||||||
{
|
{
|
||||||
|
assert(!vec.empty());
|
||||||
assert(perc>=0 && perc<=1);
|
assert(perc>=0 && perc<=1);
|
||||||
DirtyCheck();
|
DirtyCheck();
|
||||||
int index = vec.size() *perc -1;
|
int index = vec.size() *perc -1;
|
||||||
|
|
Loading…
Reference in New Issue