mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 07:42:10 +02:00
Docs: LazUtils/graphmath. Adds missing content for the overloaded Distance function.
This commit is contained in:
parent
6ca87f810b
commit
9ac757f684
@ -501,20 +501,67 @@ Zero degrees is at the 3 o'clock position.
|
|||||||
|
|
||||||
<element name="Distance">
|
<element name="Distance">
|
||||||
<short>
|
<short>
|
||||||
Get the <var>Distance</var> between any two Points. It is primarily for use
|
Gets the distance between two points, or the distance of a point from a
|
||||||
in other routines such as EccentricAngle.
|
specified line.
|
||||||
</short>
|
</short>
|
||||||
<descr/>
|
<descr>
|
||||||
|
<p>
|
||||||
|
<var>Distance</var> is an overloaded function with variants that operate on
|
||||||
|
either two TPoint coordinates, or on a point (TFloatPoint) and a line defined
|
||||||
|
by two additional points (TFloatPoint) values. The Distance() function is used
|
||||||
|
primarily for internal purposes (such as in Bezier2PolyLine and EccentricAngle)
|
||||||
|
but can be used for any purpose.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The return value is an Extended type with the calculated distance between the
|
||||||
|
argument values.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The variant using TPoint arguments calculates the length of a straight line
|
||||||
|
between the coordinates in PT1 and PT2 using the Pythagorean theorem. The
|
||||||
|
distance between identical points is always zero (0). The distance is always a
|
||||||
|
positive value.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The variant with TFloatPoint arguments calculates the distance between the
|
||||||
|
point Pt and the line represented by the points in SP and EP using Euclidean
|
||||||
|
geometry. The distance is derived by finding the length of an imaginary line
|
||||||
|
between Pt and the closest point that intersects the slope of the line in SP
|
||||||
|
and EP. The distance is always a positive value. The distance for a point which
|
||||||
|
lies on the defined line is always zero (0).
|
||||||
|
</p>
|
||||||
|
</descr>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
<element name="Distance.Result">
|
<element name="Distance.Result">
|
||||||
<short/>
|
<short>
|
||||||
|
Straight-line distance between the specified coordinates or objects.
|
||||||
|
</short>
|
||||||
</element>
|
</element>
|
||||||
<element name="Distance.PT1">
|
<element name="Distance.PT1">
|
||||||
<short/>
|
<short>
|
||||||
|
Starting point for the calculated distance.
|
||||||
|
</short>
|
||||||
</element>
|
</element>
|
||||||
<element name="Distance.Pt2">
|
<element name="Distance.PT2">
|
||||||
<short/>
|
<short>
|
||||||
|
Ending point for the calculated distance.
|
||||||
|
</short>
|
||||||
|
</element>
|
||||||
|
<element name="Distance.Pt">
|
||||||
|
<short>
|
||||||
|
Fixed point for the calculated distance.
|
||||||
|
</short>
|
||||||
|
</element>
|
||||||
|
<element name="Distance.SP">
|
||||||
|
<short>
|
||||||
|
Starting point for the line used in the distance calculation.
|
||||||
|
</short>
|
||||||
|
</element>
|
||||||
|
<element name="Distance.WP">
|
||||||
|
<short>
|
||||||
|
Ending point for the line used in the distance calculation.
|
||||||
|
</short>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="EccentricAngle">
|
<element name="EccentricAngle">
|
||||||
|
Loading…
Reference in New Issue
Block a user