This method is NOT just a setter for #scale. It also adjusts the unscaled value to preserve the represented value.
When the given scaling is larger than the current scaling, this method shrinks the unscaled value accordingly. It will NOT throw any error even if underflow happens.
When the given scaling is smaller than the current scaling, this method expands the unscaled value accordingly. It does throw an error if overflow happens.
Unchecked exceptions: ArithmeticException a negative value is specified or overflow.
@param scale new scale. must be 0 or positive.
|
|
|
|
|
|
|
|