Connecting Tech Pros Worldwide Help | Site Map

Math.round in the computing of middle screen is necessary

den
Guest
 
Posts: n/a
#1: Mar 5 '07

if I want to open a popup at middle of screen in some example I see
that is used also Math.round;
is obligatory?
there are situation where the result of screen/2 if isnąt an integer can to
cause prolems?
Randy Webb
Guest
 
Posts: n/a
#2: Mar 5 '07

re: Math.round in the computing of middle screen is necessary


den said the following on 3/5/2007 1:43 PM:
Quote:
if I want to open a popup at middle of screen in some example I see
that is used also Math.round;
is obligatory?
there are situation where the result of screen/2 if isn’t an integer can to
cause prolems?
Why take the chance if using Math.round() can prevent any potential problem?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Closed Thread