Apl2ToDoTrigonometryAlgorithms

This is a sub-page of PhraseBook/ToDo/Apl2Idioms

NA←NA×○÷180 ⍝ Convert from degrees to radians.

NA←NA×180÷○1 ⍝ Convert from radians to degrees.`

NA←12○0J1⊥⊖NA ⍝ Convert from NA pairs to radians. 2=↑⍴NA

NA←12○AX+¯11○AY ⍝ Convert from AX, AY coordinates to radians.

NA←|0J1⊥⊖NA ⍝ Get magnitude of NA pairs. 2=↑⍴NA

NA←|AX+¯11○AY ⍝ Get magnitude of AX, AY coordinates.

FA←0○NA ⍝ Pythagorean: FA = side NA = side:hyp ≤ 1.

FA←4○NA ⍝ Pythagorean: FA = hypotenuse NA = side ratio.

FA←¯4○NA ⍝ Pythagorean: FA = side NA = hyp:side ≥ 1.

NA←AX+.*2 ⍝ Pythagorean: Sum of the squares of AX.

FA←NAX*÷NAY ⍝ The NAYth root of the items in NAX.


CategoryPhrasebookToDo

apl2todotrigonometryalgorithms (last edited 2011-04-25 13:59:58 by KaiJaeger)