distance_pp distance_pp DistancePp DistancePp (Operator)
Name
distance_pp distance_pp DistancePp DistancePp
— Calculate the distance between two points.
Signature
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 )
Description
The operator distance_pp distance_pp DistancePp DistancePp DistancePp
calculates the distance between pairs
of points
according to the following formula:
The result is returned in Distance Distance Distance Distance distance
.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Processed without parallelization.
Parameters
Row1 Row1 Row1 Row1 row1
(input_control) point.y(-array) →
HTuple HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the first point.
Column1 Column1 Column1 Column1 column1
(input_control) point.x(-array) →
HTuple HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the first point.
Row2 Row2 Row2 Row2 row2
(input_control) point.y(-array) →
HTuple HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the second point.
Column2 Column2 Column2 Column2 column2
(input_control) point.x(-array) →
HTuple HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the second point.
Distance Distance Distance Distance distance
(output_control) real(-array) →
HTuple HTuple Htuple (real) (double ) (double ) (double )
Distance between the points.
Example (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)
Example (C)
double row1,column1,row2,column2,distance;
draw_point(WindowHandle,&row1,&column1);
draw_point(WindowHandle,&row2,&column2);
distance_pp(row1,column1,row2,column2,&distance);
Example (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)
Example (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)
Example (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)
Result
distance_pp distance_pp DistancePp DistancePp DistancePp
returns 2 (H_MSG_TRUE).
Alternatives
distance_ps distance_ps DistancePs DistancePs DistancePs
See also
distance_pl distance_pl DistancePl DistancePl DistancePl
,
distance_pr distance_pr DistancePr DistancePr DistancePr
Module
Foundation