Math::Geometry::Construction::Vector - anything representing a vector
Math::Geometry::Construction::Vector
Version 0.024
The typical user will not interact directly with this class. It unifies the access to different sources of a vector. This can be
a reference to an array of numbers
In this case, the value method will return a Math::Vector::Real object consisting of the first two items of the array. It is only checked if the type is the Moose type ArrayRef[Num]. It is not checked if the array contains at least two items.
Moose
ArrayRef[Num]
a Math::Vector::Real object
The value method returns the object itself (not a clone).
a Math::VectorReal object
The value method returns an Math::Vector::Real object consisting of the x and y component of the vector.
x
y
a Math::Geometry::Construction::Point object
The value method returns the position attribute of the point.
a Math::Geometry::Construction::Line object
The value method returns the direction of the line.
Point and Line objects are evaluated at the time you call value.
Point
Line
$vector = Math::Geometry::Construction::Vector->new (provider => ...)
Creates a new Math::Geometry::Construction::Vector object and initializes attributes. This is the default Moose constructor.
This is the only attribute. It must be set at construction time and is readonly after that. The possible values are described in the DESCRIPTION section.
Returns a Math::Vector::Real object as described in the DESCRIPTION section.
Lutz Gehlen, <perl at lutzgehlen.de>
<perl at lutzgehlen.de>
Copyright 2013 Lutz Gehlen.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Math::Geometry::Construction, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::Geometry::Construction
CPAN shell
perl -MCPAN -e shell install Math::Geometry::Construction
For more information on module installation, please visit the detailed CPAN module installation guide.