implementation("io.github.plumsoftware:more-math:0.0.3")
Это KMP библиотека слегка упрощающая работу с математикой.