Arrotonda

Notizie

04-03-2013

Come arrotondare un numero

Inserire il seguente codice in una funzione javascript: function arrotonda(numero, posDecimali){ var numeroArrotondato = Math.round(numero * Math.pow(10, posDecimali)) / Math.pow(10, posDecimali); return numeroArrotondato; }   var num...