distance_ppdistance_ppDistancePpDistancePp (Operator)
Name
distance_ppdistance_ppDistancePpDistancePp
— Berechnen des Abstandes zwischen zwei Punkten.
Signatur
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)
Beschreibung
distance_ppdistance_ppDistancePpDistancePpDistancePp
berechnet den Abstand zwischen Paaren von Punkten.
Der Abstand berechnet sich wie folgt:
Das Ergebnis wird im Parameter
DistanceDistanceDistanceDistancedistance
übergeben.
Ausführungsinformationen
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Wird ohne Parallelisierung verarbeitet.
Parameter
Row1Row1Row1Row1row1
(input_control) point.y(-array) →
HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Zeilenkoordinate des ersten Punktes.
Column1Column1Column1Column1column1
(input_control) point.x(-array) →
HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Spaltenkoordinate des ersten Punktes.
Row2Row2Row2Row2row2
(input_control) point.y(-array) →
HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Zeilenkoordinate des zweiten Punktes.
Column2Column2Column2Column2column2
(input_control) point.x(-array) →
HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Spaltenkoordinate des zweiten Punktes.
DistanceDistanceDistanceDistancedistance
(output_control) real(-array) →
HTupleHTupleHtuple (real) (double) (double) (double)
Abstand zwischen den Punkten.
Beispiel (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)
Beispiel (C)
double row1,column1,row2,column2,distance;
draw_point(WindowHandle,&row1,&column1);
draw_point(WindowHandle,&row2,&column2);
distance_pp(row1,column1,row2,column2,&distance);
Beispiel (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)
Beispiel (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)
Beispiel (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)
Ergebnis
distance_ppdistance_ppDistancePpDistancePpDistancePp
liefert den Wert 2 (H_MSG_TRUE).
Alternativen
distance_psdistance_psDistancePsDistancePsDistancePs
Siehe auch
distance_pldistance_plDistancePlDistancePlDistancePl
,
distance_prdistance_prDistancePrDistancePrDistancePr
Modul
Foundation