true has asked for the wisdom of the Perl Monks concerning the following question:
I tried to solve this with the Math::Cephes module, But the function tells me I have to pass an array reference to it. I've tried to pass it my X,Y points in several ways but no dice.
Anybody know a simple way to do this? Here's the code from my last attempt with Cephes. Code does NOT work. The module loads fine. My error is: "Must supply array references at C:/Perl/site/lib/Math/Cephes.pm line 107."
thanks for readin,use Math::Cephes qw(:all); # double p[3], q[3], vecang();$y = vecang( $p, $q ); # For two vectors p, q, the angle A between them is given by my @p = ("0","0"); my @q = ("4","3"); my $ang = vecang(@p,@q); print "ang=$ang\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Compute Angles of a Right Triangle
by Coruscate (Sexton) on Dec 10, 2003 at 20:49 UTC | |
Re: Compute Angles of a Right Triangle
by traveler (Parson) on Dec 10, 2003 at 20:56 UTC | |
by ysth (Canon) on Dec 11, 2003 at 02:54 UTC | |
by duff (Parson) on Dec 11, 2003 at 03:43 UTC | |
Re: Compute Angles of a Right Triangle
by Plankton (Vicar) on Dec 10, 2003 at 20:48 UTC | |
Re: Compute Angles of a Right Triangle
by boo_radley (Parson) on Dec 10, 2003 at 20:34 UTC |