User Tools

Site Tools


prime:polrec

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
prime:polrec [2017/10/16 20:37]
webmasterpdx
prime:polrec [2017/10/20 19:13] (current)
webmasterpdx
Line 5: Line 5:
 In the geometry app you can enter a point in either form using the point() function. In the geometry app you can enter a point in either form using the point() function.
  
-If you enter a polar coordinate as in 1∠(π/4), and hit enter, and then hit the <​angle> ​button again, it'll convert the number to it's rectangular/​complex form.+If you enter a polar coordinate as in 1∠(π/4), and hit enter, and then hit the ∠ button again, it'll convert the number to it's rectangular/​complex form
 + 
 +Note that if your system is set to radians by default, you can enter degrees by using shift-units and from the units menu, select angle-deg and the value will appear as 30_deg for example. 
 +if you type 1∠30_deg and hit enter, it'll convert automatically to 1∠0.5325... (radians). 
 +To enter a point this way in the geometry app, you cannot enter point(1∠30_deg),​ but you can enter 1∠30 on the home view and hit enter to convert to radians. Then, in the geometry app, you can enter point() and select menu-copy_from_home and select the radian version to put it in the point call. You can alternatively enter point(EXPR("​1∠30_deg"​)). 
 + 
 +The following function is a useful one to have in your arsenal. It will convert from polar to rectangular and vice versa...automatically.
  
-The following function is a useful one to have in your arsenal. It will convert from polar to rectangular and vice versa...automatically. Note that it uses a shortcut for the STRING() function by just doing T:​=""​+V;​ to convert the numerical variable V to a string. (just a useful tip). 
  
-<​note>​note</​note>​ 
 <​code>​ <​code>​
 EXPORT POLREC(Z) // POLAR/RECT CONVERT EXPORT POLREC(Z) // POLAR/RECT CONVERT
 BEGIN BEGIN
  LOCAL T,A,B;  LOCAL T,A,B;
- T:=""​+Z;+ T:=STRING(Z);
  IF INSTRING(T,"​∠"​) THEN  IF INSTRING(T,"​∠"​) THEN
   // POLAR   // POLAR
Line 24: Line 28:
   A:=ABS(Z);   A:=ABS(Z);
   B:=ARG(Z);   B:=ARG(Z);
-  RETURN EXPR(A ""​ B);+  RETURN EXPR(A "" B);
  END // IF...  END // IF...
 END // BEGIN END // BEGIN
 </​code>​ </​code>​
  
-  
prime/polrec.1508211479.txt.gz · Last modified: 2017/10/16 20:37 by webmasterpdx