distance_pp distance_pp DistancePp DistancePp distance_pp (Operator)
distance_pp distance_pp DistancePp DistancePp distance_pp
— 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 )
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
Description
The operator distance_pp distance_pp DistancePp DistancePp distance_pp
calculates the distance between pairs
of points
according to the following formula:
The result is returned in Distance Distance Distance distance distance
.
Parameter Broadcasting
This operator supports parameter broadcasting.
This means that each parameter can be given as a tuple of length
1 or N .
Parameters with tuple length 1 will be repeated internally
such that the number of computed distances is always N .
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Automatically parallelized on internal data level.
Parameters
Row1 Row1 Row1 row1 row_1
(input_control) point.y(-array) →
HTuple MaybeSequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the first point.
Column1 Column1 Column1 column1 column_1
(input_control) point.x(-array) →
HTuple MaybeSequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the first point.
Row2 Row2 Row2 row2 row_2
(input_control) point.y(-array) →
HTuple MaybeSequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the second point.
Column2 Column2 Column2 column2 column_2
(input_control) point.x(-array) →
HTuple MaybeSequence[Union[float, int]] 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 Sequence[float] 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)
Result
distance_pp distance_pp DistancePp DistancePp distance_pp
returns 2 (
H_MSG_TRUE )
.
Alternatives
distance_ps distance_ps DistancePs DistancePs distance_ps
See also
distance_pl distance_pl DistancePl DistancePl distance_pl
,
distance_pr distance_pr DistancePr DistancePr distance_pr
Module
Foundation