fixed an integer division error (should have been a float division)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@567813 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2007-08-20 20:08:59 +00:00
parent a7cc642717
commit 22b8f2abbd
1 changed files with 1 additions and 1 deletions

View File

@ -667,7 +667,7 @@ public class ResizableDoubleArray implements DoubleArray, Serializable {
*/
private synchronized boolean shouldContract() {
if (expansionMode == MULTIPLICATIVE_MODE) {
return (internalArray.length / numElements) > contractionCriteria;
return (internalArray.length / ((float) numElements)) > contractionCriteria;
} else {
return (internalArray.length - numElements) > contractionCriteria;
}