()
| 125 | |
| 126 | // 加法 |
| 127 | const addition = function () { |
| 128 | // 计算倍数 |
| 129 | let maxDecimalDigits = getMaxDecimalDigits(arguments) |
| 130 | let times = Math.pow(10, maxDecimalDigits); |
| 131 | // 计算结果 |
| 132 | let results = 0 |
| 133 | for (let i = 0; i < arguments.length; i++) { |
| 134 | results += toInteger(arguments[i], maxDecimalDigits) |
| 135 | } |
| 136 | results = results / times |
| 137 | // 返回结果 |
| 138 | return results |
| 139 | |
| 140 | } |
| 141 | // 加法别名 |
| 142 | const jiafa = addition |
| 143 | const jia = addition |
nothing calls this directly
no test coverage detected