Rescale this Decimal256 in place without checks @param newScale The new scale (must be >= current scale)
(int newScale)
| 2887 | * @param newScale The new scale (must be >= current scale) |
| 2888 | */ |
| 2889 | private void rescale0(int newScale) { |
| 2890 | int scaleDiff = newScale - this.scale; |
| 2891 | |
| 2892 | boolean isNegative = isNegative(); |
| 2893 | if (isNegative) { |
| 2894 | negateNonNull(); |
| 2895 | } |
| 2896 | |
| 2897 | // Multiply by 10^scaleDiff |
| 2898 | multiplyByPowerOf10InPlace(scaleDiff); |
| 2899 | |
| 2900 | if (isNegative) { |
| 2901 | negateNonNull(); |
| 2902 | } |
| 2903 | |
| 2904 | this.scale = newScale; |
| 2905 | } |
| 2906 | |
| 2907 | /** |
| 2908 | * Set this Decimal256 from a byte array representation. |
no test coverage detected