casting - Converting double to integer in Java - Stack Overflow

PHOTO EMBED

Sun Oct 30 2022 16:45:21 GMT+0000 (Coordinated Universal Time)

Saved by @arnojunio #java

int y = (int)Math.round(x);
content_copyCOPY

https://stackoverflow.com/questions/6468730/converting-double-to-integer-in-java