groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Groff] couple of questions regarding pic


From: Ted Harding
Subject: RE: [Groff] couple of questions regarding pic
Date: Fri, 18 Aug 2000 14:15:25 +0100 (BST)

On 18-Aug-00 Ted Harding wrote:
> instead of
> 
> pi = atan2(0,1)
> 
> since for some reason
> this returns the result 0:
> 
> sprintf("%6.4f",pi) -> 0.0000

NOTE: the atan2 function in pic (like in awk) is

  atan2(y,x)

and NOT

  atan2(x,y)

which is why atan2(0,1) = 0, atan2(1,0) = pi/2 and atan2(0,-1) = pi.

Ted.



--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 284 7749
Date: 18-Aug-00                                       Time: 14:15:25
------------------------------ XFMail ------------------------------

reply via email to

[Prev in Thread] Current Thread [Next in Thread]