back to Command Reference
[All Models]
Converts polar coordinates (r,theta) to rectangular coordinates (x,y).
REC ( distance r , angle theta )
└────┬───┘ └───┬──┘
Numeric expression Numeric expression
REC(10,15)
Converts polar coordinates (r,theta) to rectangular coordinates (x,y). The following relational expressions are used at this time:
x = r cos theta, y = r sin theta
The value of x is automatically assigned to variable X, while y is automatically assigned to variable Y.
10 A=2 : B=30
20 Z=REC(A,B)
30 PRINT X; Y
Converts polar coordinates (2,30) to rectangular coordinates.