Join Slack
Powered by
What is the reason that kotlins round signature `f...
# announcements
p
Paul Woitaschek
01/12/2018, 10:05 AM
What is the reason that kotlins round signature
fun round(x : Float) : Float
returns float but javas Math.
int round(float a)
returns int?
l
lovis
01/12/2018, 10:12 AM
I’d say because its more common to keep the type, but round it anyway. (Why should rounding change the type to begin with)
2
Views
Open in Slack
Previous
Next