Arctangent cartesian, without using atan2, or even ring input names!

I represented

\tan _2 ^{-1} (y, x) = \frac x {\vert x \vert} \cos ^{-1} \frac x {\sqrt {x ^2 + y ^2}}

into blocks, without using the blocks below!

(atan2 () / ())
(() input names: ((parameter)) @delInput @addInput :: gray ring)

Block

Example

\tan _2 ^{-1} (\sqrt 3, 1) = \frac {\sqrt 3} {\vert \sqrt 3 \vert} \cos ^{-1} \frac {\sqrt 3} {\sqrt {(\sqrt 3) ^2 + 1 ^2}} = 60 ^{\circ} {\color {LightGray} {} \approx 59.9999~9999~9999~99 ^{\circ}}

Result

Why are you using implicit parameters?


Other than that, really cool! I tested it and it is really accurate

I am using the traditional Snap! form to make it.

(() input names: ((x)) ((y)) @delInput @addInput)

is equivalent to

({script variables ((x)) ((y)) @delInput @addInput
set [x V] to []
set [y V] to []} @addInput)

But I thought (() input names: ((x)) ((y))@<>) was a standard Snap! form!

Normally, Snap! used blank inputs for parameters. But it advanced to input names.

There is no standard form. In fact, it’s more common to use the implicit form (blank values) when each variable is used once, and the explicit form for cases like this where you use the variables multiple times.

Okay, it seems I shouldn’t use terms like “Without using explicit form”…

Snap! has had both explicit & implicit parameters since release.

Okay, then. We should stop the war (Or something like that).

  • Don’t complain or start the war using comments in this post.
  • I will make a new post using ‘Explicit form of parameters’, then.

this isn’t an online war, they were just giving a suggestion :slight_smile: