function truncateDecimal(s, settings, paste) {
        var aDec = settings.aDec,
            mDec = settings.mDec;
        s = (paste === 'paste') ? autoRound(s, settings) : s;
        if (aDec && mDec) {
            var parts = s.split(aDec);
            /** truncate decimal part to satisfying length
             * cause we would round it anyway */
            if (parts[1] && parts[1].length > mDec) {
                if (mDec > 0) {
                    parts[1] = parts[1].substring(0, mDec);
                    s = parts.join(aDec);
                } else {
                    s = parts[0];
                }
            }
        }
        return s;
    }
/**
     * truncate decimal part of a number
     */
truncate decimal part of a number
truncate decimal part of a number
function truncateDecimal(s, settings, paste) {
        var aDec = settings.aDec,
            mDec = settings.mDec;
        s = (paste === 'paste') ? autoRound(s, settings) : s;
        if (aDec && mDec) {
            var parts = s.split(aDec);
            if (parts[1] && parts[1].length > mDec) {
                if (mDec > 0) {
                    parts[1] = parts[1].substring(0, mDec);
                    s = parts.join(aDec);
                } else {
                    s = parts[0];
                }
            }
        }
        return s;
    }
function truncateDecimal ( s , settings , paste ) { var aDec = settings . aDec , mDec = settings . mDec ; s = ( paste === 'paste' ) ? autoRound ( s , settings ) : s ; if ( aDec && mDec ) { var parts = s . split ( aDec ) ; if ( parts [ 1 ] && parts [ 1 ] . length > mDec ) { if ( mDec > 0 ) { parts [ 1 ] = parts [ 1 ] . substring ( 0 , mDec ) ; s = parts . join ( aDec ) ; } else { s = parts [ 0 ] ; } } } return s ; }
truncate decimal part of a number
truncate decimal part of a number
/** truncate decimal part to satisfying length
             * cause we would round it anyway */