参数里就一个-1,应该都是负数啊,我数学不太好。
vx:Math.pow( -1 , Math.ceil( Math.random()*1000 ) ) * 4
Math.ceil()是取整函数,Math.pow(a,b)意思是a的b次方。计算后结果为-4或4,懂了吗