(decimal: number)
| 172 | // decimal point does not advance by 1 |
| 173 | // For example, 1.23 and 1.26 both return 1.2 |
| 174 | export function normalDecimal(decimal: number) { |
| 175 | return Math.floor(decimal * 10) / 10; |
| 176 | } |
| 177 | |
| 178 | // Storage unit conversion, parameter unit is b |
| 179 | // Rule: normal conversion, do not do 1 processing |
no outgoing calls
no test coverage detected