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