Navigator 2.0, Internet Explorer 3.0
Math.round(x)
Any number or numeric expression
The integer closest to x.
Math.round() rounds its argument up or down to the nearest integer.
In Navigator 2.0, Math.round() did not correctly round very large numbers. The following workaround can be used:
function my_round(num) { var fl =index.html Math.floor(num); var ce = Math.ceil(num); return (fl == ce) ? num : ((num - fl) < (num - ce)) ? fl : ce; }
file: /Techref/language/JAVA/script/definitive/refp_240.htm, 4KB, , updated: 2019/10/14 15:00, local time: 2024/12/13 07:02,
3.147.66.38:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://techref.massmind.org/Techref/language/JAVA/script/definitive/refp_240.htm"> [Chapter 21] Reference: Math.round()</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Ashley Roll has put together a really nice little unit here. Leave off the MAX232 and keep these handy for the few times you need true RS232! |
.