While writing some code designed to work on both platforms (JVM & JS), I realized that Math functions can’t be accessed from the JS implementation without first importing kotlin.js.Math. This causes .kt files that should otherwise compile seamlessly on both platforms to suddenly require a platform-specific tweak for things like Math.pow() and Math.random(), even though they exist in both implementations!
Is there a reason kotlin.js.Math can’t be automatically imported like other packages? The ability to re-use more code between projects is one of the major benefits of having a JavaScript implementation in the first place, and this seems like an odd place to lose out on that.
This request probably also applies to Kotlin Native, assuming it has a similar Math package.