in reply to Re: Compute Angles of a Right Triangle
in thread Compute Angles of a Right Triangle
Math::Trig is bundled with perl, but if you wanted to use a builtin, you could use atan2 instead, passing the two sides as separate arguments.
That isn't as acurate a value of pi as possible. 3.14159265359 is closer (since the digits following 89 are 7932). You can use 4*atan2(1,1) to get a value with accuracy commensurate with your perl's floating point accuracy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Compute Angles of a Right Triangle
by duff (Parson) on Dec 11, 2003 at 03:43 UTC |