Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a standard decimal type in Scala 2.9?

What is the Scala's analogue to C#'s decimal? Should I use java.math.BigDecimal or is there own standard type for this in Scala?

like image 708
Ivan Avatar asked Dec 06 '11 13:12

Ivan


1 Answers

There is scala.math.BigDecimal which is already imported in Predef. This is only a wrapper around java.math.BigDecimal that uses operator names for methods (like e.g. + instead of add).

like image 124
Moritz Avatar answered Oct 22 '22 19:10

Moritz