Help for this page

Select Code to Download


  1. or download this
    if y > 0 then
         if x > 0 then tc1 = arctan(y/x)
    ...
         if x > 0 then tc1 = 0
         if x < 0 then tc1 = 180
         if x = 0 then [the 2 points are the same]
    
  2. or download this
    print atan2( $_->[0], $_->[1] ) 
        for [ 0,-1],[ 0,+1],[-1, 0],[+1, 0],
    ...
    -0.785398163397448
    -2.35619449019234
    2.35619449019234