aValue = double( aVariant.toLongLong() );
else if( aVariant.type() == QVariant::Double )
aValue = aVariant.toDouble();
- aNorm += aValue * aValue;
+ if ( theFieldNbComponents > 1 )
+ aNorm += aValue * aValue;
+ else
+ aNorm += aValue;
}
}
}
{
if( anIsBoolean )
aNorm /= theFieldNbComponents;
- else
+ else if ( theFieldNbComponents > 1 )
aNorm = pow( aNorm, 0.5 );
if( aGroupedList.isEmpty() )