How do I do casting in Scala? July 15, 2023 by Tarik You can do (myDouble/myInt).toInt. You can also do toDouble, toLong, and toFloat.