Name

Math::Vectors2 - Vectors in two dimensions

Synopsis

 use Math::Vectors2;

 my ($o, $x, $y) = Math::Vectors2::zeroAndUnits;
 ok $o->print($x, $y) eq '(0,0), (1,0), (0,1)';

 my $p1 = $x->times(3);
 my $p2 = $y->times(4);
 my $p  = $o->plus($p1, $p2);

 ok $p->print($p1, $p2) eq '(3,4), (3,0), (0,4)';
 ok $o->d($p) == 5;

Or more briefly:

 use Math::Vectors2;

 *v = *Math::Vectors2::new;

 ok v(3,4)->l == 5;

Description

Vectors in two dimensions

Version '20171009'.

The following sections describe the methods in each functional area of this module. For an alphabetic listing of all methods by name see Index.

Index

Installation

This module is written in 100% Pure Perl and, thus, it is easy to read, comprehend, use, modify and install via cpan:

  sudo cpan install Math::Vectors2

Author

philiprbrenan@gmail.com

http://www.appaapps.com

Copyright

Copyright (c) 2016-2018 Philip R Brenan.

This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.