値が挿入されている3つの位置に値を挿入していますが、どういうわけか残りの部分をコピーしているときに最後のポイントをコピーしません。配列のサイズは増加していません。中間の配列に新しい要素を追加する方法を教えてください。
for(indexpoint=0;indexpoint<3;indexpoint++)
{
temp.points[indexpoint].x = intpoints[indexpoint].x+this.x;
temp.points[indexpoint].y = intpoints[indexpoint].y+this.y;
}
temp.points[3].x = (intpoints[2].x+intpoints[3].x)/2+this.x;
temp.points[3].y = (intpoints[2].y+intpoints[3].y)/2+this.y;
for(indexpoint=3;indexpoint<intpoints.length;indexpoint++)
{
temp.points[indexpoint+1].x = intpoints[indexpoint].x+this.x;
temp.points[indexpoint+1].y = intpoints[indexpoint].y+this.y;
}