Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js arrotondare superiore numero

 var myNum = 2/3;               // 0.6666666666666666
 var multiplier = 100;
 var a = Math.round(myNum * multiplier) / multiplier;  // 0.67
 var b = Math.ceil (myNum * multiplier) / multiplier;  // 0.67
 var c = Math.floor(myNum * multiplier) / multiplier;  // 0.66
Source by riptutorial.com #
 
PREVIOUS NEXT
Tagged: #js #arrotondare #superiore #numero
ADD COMMENT
Topic
Name
8+1 =