9951 explained code solutions for 126 technologies


javascriptConvert float number to integer


var int = Math.round( 25.99 );ctrl + c
25.99

some float number

Math.round

will round given float (use Math.floor to get lower int, Math.ceil to get upper int)

int

will contain resulting integer