Is JS / Clojure code for converting polar coordinates to cartesian ones?
Given an angle in polar coordinates I want to understand its cartesian coordinates on an arbitrary (tangential?) rectangle (on its sides).

I can imagine the solution, roughly, so I'm asking if you have seen the code, not guidance :)

[![graph](https://i.stack.imgur.com/5TRpq.jpg)](https://i.stack.imgur.com/5TRpq.jpg)