All you need here was to change `Double intensity` to `BigDecimal intensity`. Decimal literals like `0.1` are already `BigDecimal`s in Groovy.