![]() |
| サイトマップ | |
|
関数 partdist
は、最初の xy ペアから2番目以降の xy ペアまでの距離を1つの範囲として順番に返します。線分を表す xy のペアは引数 x range と引数 y range で指定します。引数 x range と y range が同じ場合、この範囲の最後の値は dist
関数の戻り値と同じ値になります。
partdist
(x range, y range)
引数 x range に x 座標、引数 y range に y 座標を指定します。これらの配列の対応する値同士が xy のペアとなります。
もし2つの範囲の大きさが等しくない場合、余分な x または y ポイントは無視されます。
x = {0,1,1,0,0}、y = {0,0,1,1,0}
の場合、partdist(x, y)
は {0,1,2,3,4}
の配列を返します。X と Y の座標は、単位1 の x と単位1 の y の正方形を表しています。
The partdist function returns a range representing the distance from the first X,Y pair to each other successive pair. The line segment X,Y pairs are specified by an x range and a y range. The last value in this range is numerically the same as that returned by dist, assuming the same x and y ranges.
partdist(x range,y range)
The x range argument specifies the x coordinates, and the y range argument specifies the y coordinates. Corresponding values in these ranges form xy pairs.
If the ranges are uneven in size, excess x or y points are ignored.
For the ranges x = {0,1,1,0,0} and y = {0,0,1,1,0}, the operation partdist(x,y) returns a range of {0,1,2,3,4}. The X and Y coordinates provided describe a square of 1 unit x by 1 unit y.