
20.06.2016, 03:22
|
|
блогер
Регистрация: Jul 2013
Адрес: Север
Сообщений: 1,922
|
int это не округление, а приведение типа, что при Number отбрасывает дробную часть.
Смотрите функции
Math.floor,
Math.ceil,
Math.round.
Вас интересует Math.round.
__________________
There is no thing in this world that is not simple.
|