Difference between revisions of "ToCart"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function ToCart(Point: PPoint): TPoint; </source> ==Availability== SCAR Divi 3.00 > Current ==Description== Converts a given p...") |
|||
Line 17: | Line 17: | ||
begin | begin | ||
− | p.R := | + | p.R := 4; |
− | p.T := | + | p.T := 45; |
tp := ToCart(p); | tp := ToCart(p); | ||
WriteLn('TPoint(' + IntToStr(tp.X) + ',' + IntToStr(tp.Y) + ')'); | WriteLn('TPoint(' + IntToStr(tp.X) + ',' + IntToStr(tp.Y) + ')'); | ||
Line 25: | Line 25: | ||
Output: | Output: | ||
− | TPoint( | + | TPoint(3,3) |
==See Also== | ==See Also== |
Revision as of 23:54, 2 July 2011
Definition
function ToCart(Point: PPoint): TPoint;
Availability
SCAR Divi 3.00 > Current
Description
Converts a given polar coordinate defined by the PPoint Point to a cartesian coordinate defined by a Tpoint.
Example
var p: PPoint; tp: TPoint; begin p.R := 4; p.T := 45; tp := ToCart(p); WriteLn('TPoint(' + IntToStr(tp.X) + ',' + IntToStr(tp.Y) + ')'); end.
Output:
TPoint(3,3)