![]() |
| サイトマップ | |
|
関数 dist
は、直線の長さをスカラーで返します。直線は X と Y のペアで定義される線分であらわされるもので、引数 x range と y range で指定します。
dist
(x range, y range)
引数 x range は x 座標、引数 y range は y 座標の値を指定します。2つの範囲の対応する値同士が、X,Y のペアとなります。2つの範囲の大きさが等しくない場合は、余分な X または Y は無視されます。
x ={0,1,1,0,0}
、y = {0,0,1,1,0}
の場合、dist(x,y)
は、4.0 を返します。指定した X と Y の座標は、単位 1 の x と単位 1 の y からなる正方形を表します。
The dist function returns a scalar representing the distance along a line. The line is described in segments defined by the X,Y pairs specified in an x range and a y range.
dist(x range,y range)
The x range argument contains the X coordinates, and the y range argument contains the Y coordinates. Corresponding values in these ranges form X,Y 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 dist(x,y) returns 4.0. The X and Y coordinates provided describe a square of 1 unit x by 1 unit y.