rot =: [: +. (%|)@[ * j./@] On Tue, Feb 16, 2016 at 4:12 PM, Kip Murray <[email protected]> wrote:
> Another example > > 0j2 rot 3 4 > _4 3 > > This rotates 3 4 by 90 degrees, counterclockwise. > > --Kip > > > On Tuesday, February 16, 2016, Kip Murray <[email protected]> wrote: > > > Fairly easy: write a verb that rotates a point in the plane by the angle > > of a given complex number. For example > > > > 1j1 rot 1 1 NB. Rotate 1 1 counterclockwise 45 degrees > > 0 1.414213562 > > > > Background information: when you multiply two complex numbers the > > magnitudes are multiplied and the angles are added. > > > > --Kip Murray > > > > > > > > -- > > Sent from Gmail Mobile > > > > > -- > Sent from Gmail Mobile > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
