阵列长度问题

我在这个脚本上有问题. 通常是脚本 工作和警报的数组长度为9.但是,每隔一段时间 阵列长度为8,自然而然的输出是错误的. 但是看到 当我在循环中使用dis/8时,阵列长度如何为8? var dis = myline.distance(); var fresnelhi = []; var fresnello = []; VAR Height二夫人; var minheight; var Slope = height -diff/dis; var freq = document.getElementById(" freq1").值; wl = .3/freq; 对于(s = 0; s <= dis; s = s+(dis/8)){ var IntervalHeight =(斜率*s) + minheight; var点= wl*s*(dis-s)/dis; Freshi =(IntervalHeight + Math.sqrt(points))/10; fresnelhi.push(Freshi); freslo =(IntervalHeight -Math.sqrt(points))/10; fresnello.push(Freslo); } 警报(fresnello.length)

# 回答1

史蒂夫·梅特(Steve Meinte): 我想一个舍入错误. 格雷戈尔 - http://photo.gregorkofler.at ::: landschafts- und reisefotografie http://web.gregorkofler.com ::::::: meine js-spielwiese http://wwwww.image2d.com ::: :::: ::: ::: :: :: :: :: :: :: ::: 拉姆
# 回答2

在comp.lang.javascript消息<21d91a8b-cd30-41cb-89ee-04A9358495D5@d4 5G2000HSC.GoogleGroups.com>,星期五,2008年8月1日06:31:33,史蒂夫 .
# 回答3

8月1日,晚上7:50,J r Stockton博士

标签: Javascript

添加新评论