Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
Maybe it's a dumb question, I don't know…
Why "Math.Truncate()" (trunc() in C++) returns a double?
Its only purpose is to return the integer part of a double, which is a fucking integer…
Same for floor() and ceil().
My point is that you can put an int in a double without any problem (so they could have return an int), not the other way around, so you have to convert it if you need it in an int.
question
trunc
truncate
double
int
why
math