Ivan
Ivan

Reputation: 64207

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?

Upvotes: 9

Views: 7983

Answers (1)

Moritz
Moritz

Reputation: 14212

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).

Upvotes: 16

Related Questions