Calculate the midpoint between points A and B. A and B may be multidimensional.
if(a.length!=b.length){ console.error("dojox.math.midpoint: Points A and B are not the same dimensionally.", a, b); } var m=[]; for(var i=0; i<a.length; i++){ m[i]=(a[i]+b[i])/2; } return m; // Array