[system] / trunk / webwork / system / courseScripts / PGcomplexmacros.pl Repository:
ViewVC logotype

Diff of /trunk/webwork/system/courseScripts/PGcomplexmacros.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 327 Revision 384
66 66
67 Output is text displaying the complex number in "e to the i theta" form. The 67 Output is text displaying the complex number in "e to the i theta" form. The
68 formats for the argument theta is determined by the option C<theta_format> and the 68 formats for the argument theta is determined by the option C<theta_format> and the
69 format for the modulus is determined by the C<r_format> option. 69 format for the modulus is determined by the C<r_format> option.
70 70
71
71=cut 72=cut
72 73
73 74
74 75
75sub polar{ 76sub polar{
76 my $z = shift; 77 my $z = shift;
77 my %options = @_; 78 my %options = @_;
79 my ($rformat,$theta_format);
78 set_default_options(\%options, r_format => ':%0.3f', 80 set_default_options(\%options, r_format => ':%0.3f',
79 theta_format => ':%0.3f', 81 theta_format => ':%0.3f',
80 ); 82 );
81 my $r = rho($z); 83 my $r = rho($z);
82 my $theta = $z->theta; 84 my $theta = $z->theta;

Legend:
Removed from v.327  
changed lines
  Added in v.384

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9