-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use standard random API #1988
Use standard random API #1988
Conversation
turansky
commented
May 3, 2020
- Deprecated API usage removed
@@ -35,8 +36,7 @@ private fun HTMLElement.setPosition(x: Double, y: Double) { | |||
} | |||
} | |||
|
|||
@Suppress("DEPRECATION") | |||
private fun random() = kotlin.js.Math.random() | |||
private fun random():Double = Random.nextDouble() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One empty line should also be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which one? I don't add empty lines :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. My bad. Disregard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I somehow thought I've removed the function completely. Actually, there's now no much sense in having this function in the first place -- it would be better if it is just inlined to all its use-sites.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inlined
* Use standard random API * Inline 'random' method