Difference between revisions of "TPAMiddle"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <func>function TPAMiddle(const TPA: TPointArray): TPoint;</func> ==Availability== SCAR Divi 3.20 > Current ==Description== This function determines the center po...")
 
(Redirected page to TPAMean)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Definition==
+
#REDIRECT [[TPAMean]]
<func>function TPAMiddle(const TPA: TPointArray): TPoint;</func>
 
  
==Availability==
+
[[Category:Deprecated Functions]]
SCAR Divi 3.20 > Current
 
 
 
==Description==
 
This function determines the center point of a given [[TPointArray]] '''TPA''' by calculating the averages of the x and y coordinates.
 
 
 
==Aliases==
 
*MiddleTPA
 
 
 
==Example==
 
<source lang="scar">
 
var
 
  TPA: TPointArray;
 
  MiddlePoint: TPoint;
 
 
 
begin
 
  TPA := [Point(0, 0), Point(2, 2), Point(5, 10)];
 
  MiddlePoint := MiddleTPA(TPA);
 
  WriteLn('Middle-Point(' + IntToStr(MiddlePoint.x) + ',' + IntToStr(MiddlePoint.y) + ')');
 
end.
 
</source>
 
 
 
Output:
 
Middle-Point(2,4)
 
 
 
==See Also==
 
*[[TPAMiddleEx]]
 
 
 
[[Category:Functions]]
 
[[Category:TPA Functions]]
 

Latest revision as of 18:01, 22 November 2012

Redirect to: