(value: number)
| 115 | const MIN_NON_ZERO_RESULT = 0.1; |
| 116 | |
| 117 | export function roundValue(value: number): number { |
| 118 | const roundedValue = Math.round(value * 10) / 10; // round with max 1 decimal |
| 119 | if (roundedValue === 0 && value !== 0) { |
| 120 | return MIN_NON_ZERO_RESULT * Math.sign(value); |
| 121 | } |
| 122 | return roundedValue; |
| 123 | } |
| 124 | |
| 125 | export function formatScoreChange(diff: number): InlineText { |
| 126 | const marker = getDiffMarker(diff); |
no outgoing calls
no test coverage detected