Can someone help me understand what’s happening here? Perhaps the deprecated warning message is simply misleading?

```
for { radians <- -Pi to Pi by Pi/20}
println(s"radian=$radians cos=${cos(radians)}")
```

IntelliJ tells me `to`

is deprecated, and that I shoudl use BigDecimal range.

However, if I try to use BigDecimal range, I get other problems.

```
Error:(80, 43) type mismatch;
found : scala.math.BigDecimal
required: Double
println(s"radian=$radians cos=${cos(radians)}")
```

Here is the code.

```
def main(argv:Array[String]):Unit = {
for { radians <- -Pi to Pi by Pi/20}
println(s"radian=$radians cos=${cos(radians)}")
for { radians <- BigDecimal(-Pi) to Pi by Pi/20}
println(s"radian=$radians cos=${cos(radians)}")
}
```