java - How to round up my BigDecimal to have 2 digits after the decimal point? (scala) -


this question has answer here:

what best solution make bigdecimal have 2 digits after decimal point (while keeping precise possible) in scala?

val bigdec1 = bigdecimal(12345.12) val bigdec2 = bigdecimal(1345.12) ((bigdec1/bigdec2)*100)  

the last row equal 917.7709051980492446770548352563340 want 917.77.


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -