Closed PurkkaKoodari closed 8 years ago
The result of forcing the use of a pair here is awfully long, but currently it would be even longer to do.
Example:
.t,_3 4 14
Compiles to
imp_print(trig([neg(3),(4)],(14)))
Which prints
-0.6435011087932844
All tests run correctly, and I added one to test this feature.
Pyth already has this. atan2 is the same as the complex phase, implemented as P. The snippet posted is equivalent to P.j4_3, and gives the same result. I doubt this will often be shorter.
P
P.j4_3
The result of forcing the use of a pair here is awfully long, but currently it would be even longer to do.
Example:
Compiles to
Which prints
All tests run correctly, and I added one to test this feature.