distance_ppdistance_ppDistancePpDistancePpdistance_pp (算子)

名称

distance_ppdistance_ppDistancePpDistancePpdistance_pp — 计算两点之间的距离。

签名

distance_pp( : : Row1, Column1, Row2, Column2 : Distance)

Herror distance_pp(double Row1, double Column1, double Row2, double Column2, double* Distance)

Herror T_distance_pp(const Htuple Row1, const Htuple Column1, const Htuple Row2, const Htuple Column2, Htuple* Distance)

void DistancePp(const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, HTuple* Distance)

static HTuple HMisc::DistancePp(const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2)

static double HMisc::DistancePp(double Row1, double Column1, double Row2, double Column2)

static void HOperatorSet.DistancePp(HTuple row1, HTuple column1, HTuple row2, HTuple column2, out HTuple distance)

static HTuple HMisc.DistancePp(HTuple row1, HTuple column1, HTuple row2, HTuple column2)

static double HMisc.DistancePp(double row1, double column1, double row2, double column2)

def distance_pp(row_1: MaybeSequence[Union[float, int]], column_1: MaybeSequence[Union[float, int]], row_2: MaybeSequence[Union[float, int]], column_2: MaybeSequence[Union[float, int]]) -> Sequence[float]

def distance_pp_s(row_1: MaybeSequence[Union[float, int]], column_1: MaybeSequence[Union[float, int]], row_2: MaybeSequence[Union[float, int]], column_2: MaybeSequence[Union[float, int]]) -> float

描述

算子 distance_ppdistance_ppDistancePpDistancePpDistancePpdistance_pp calculates the distance between pairs of points according to the following formula: The result is returned in DistanceDistanceDistanceDistancedistancedistance

执行信息

参数

Row1Row1Row1Row1row1row_1 (输入控制)  point.y(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row coordinate of the first point.

Column1Column1Column1Column1column1column_1 (输入控制)  point.x(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column coordinate of the first point.

Row2Row2Row2Row2row2row_2 (输入控制)  point.y(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row coordinate of the second point.

Column2Column2Column2Column2column2column_2 (输入控制)  point.x(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column coordinate of the second point.

DistanceDistanceDistanceDistancedistancedistance (输出控制)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Distance between the points.

示例(HDevelop)

dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
draw_point (WindowHandle, Row1, Column1)
gen_cross_contour_xld (Cross, Row1, Column1, 15, 0)
draw_point (WindowHandle, Row2, Column2)
gen_cross_contour_xld (Cross, Row2, Column2, 15, 0)
distance_pp (Row1, Column1, Row2, Column2, Distance)

示例(C)

double   row1,column1,row2,column2,distance;

draw_point(WindowHandle,&row1,&column1);
draw_point(WindowHandle,&row2,&column2);
distance_pp(row1,column1,row2,column2,&distance);

示例(HDevelop)

dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
draw_point (WindowHandle, Row1, Column1)
gen_cross_contour_xld (Cross, Row1, Column1, 15, 0)
draw_point (WindowHandle, Row2, Column2)
gen_cross_contour_xld (Cross, Row2, Column2, 15, 0)
distance_pp (Row1, Column1, Row2, Column2, Distance)

示例(HDevelop)

dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
draw_point (WindowHandle, Row1, Column1)
gen_cross_contour_xld (Cross, Row1, Column1, 15, 0)
draw_point (WindowHandle, Row2, Column2)
gen_cross_contour_xld (Cross, Row2, Column2, 15, 0)
distance_pp (Row1, Column1, Row2, Column2, Distance)

示例(HDevelop)

dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
draw_point (WindowHandle, Row1, Column1)
gen_cross_contour_xld (Cross, Row1, Column1, 15, 0)
draw_point (WindowHandle, Row2, Column2)
gen_cross_contour_xld (Cross, Row2, Column2, 15, 0)
distance_pp (Row1, Column1, Row2, Column2, Distance)

结果

distance_ppdistance_ppDistancePpDistancePpDistancePpdistance_pp 返回 2 ( H_MSG_TRUE )。

替代

distance_psdistance_psDistancePsDistancePsDistancePsdistance_ps

另见

distance_pldistance_plDistancePlDistancePlDistancePldistance_pl, distance_prdistance_prDistancePrDistancePrDistancePrdistance_pr

模块

基础