50g group photo

Yahoo Groups archive

50g

Index last updated: 2026-04-28 22:38 UTC

Message

Re: Two argument arctan

2008-03-06 by Tim Wessman

> It will not be pretty.

No that won't be pretty. Use the MOD command.

360 MOD   or     2 PI * MOD

Depending on your needs.

In sysRPL what you want is extreemly easy.

::
  %REC>POL ( x y -> dist ang )
  SWAPDROP
  1REV
  %MOD
;

I will add in some checking to be sure you have two real numbers.

::
  CK2NOLASTWD
  CKREAL
  xSWAP
  CKREAL
  xSWAP
  %REC>POL ( x y -> dist ang )
  xSWAP
  xDROP
  1REV
  xMOD
;

Now I'll replace with sysevals.  This is a userRPL that does exactly
what you want, and function no matter whether you are set in RADIANS,
DEGREES or GRADS.

<<
  #2629Ch
  SYSEVAL
  #36B7Bh
  SYSEVAL
  SWAP
  #36B7Bh
  SYSEVAL
  SWAP
  #30E79h
  SYSEVAL
  SWAP
  DROP
  #2F180h
  SYSEVAL
  MOD
>>  


TW

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.