


Number.prototype.ro=function(prec){
if(isNaN(prec)) prec = 1000000;
return Math.round(this*prec)/prec;
}
var prec = 1000;
var m_x = p1_x + (p2_x – p1_x)/2;
var m_y = p2_y + (p1_y – p2_y)/2;
m_x = Math.round(m_x*prec)/prec;
m_y = Math.round(m_y*prec)/prec;

function kwadrat_event_add() {
klip_mc = eval(_root.mapa_polska);
klip_mc.onMouseMove = function()
{
_root.lapka._x = Math.floor(_root._xmouse);
_root.lapka._y = Math.floor(_root._ymouse);
}
}
function kwadrat_event_delete() {
klip_mc = eval(_root.mapa_polska);
klip_mc.onMouseMove = null;
}

alert(n_height);
—————————
Windows Internet Explorer
—————————
811.267175572519
—————————
OK
—————————
n=(Math.ceil(n_height*100))/100;
alert(n);
—————————
Windows Internet Explorer
—————————
811.27
—————————
OK
—————————
n_height = parseInt(n_height);
—————————
Windows Internet Explorer
—————————
811
—————————
OK
—————————
Strona zawiera sposoby oraz kody źródłowe pokazujące rozwiazanie napotkanych problemów