NAME
Math::Geometry::Construction::Vector
- anything representing a vector
VERSION
Version 0.024
DESCRIPTION
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
typeArrayRef[Num]
. It is not checked if the array contains at least two items.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
andy
component of the vector.a Math::Geometry::Construction::Point object
The value method returns the position attribute of the point.
a Math::Geometry::Construction::Line object
Point
and Line
objects are evaluated at the time you call value.
INTERFACE
Constructors
new
$vector = Math::Geometry::Construction::Vector->new
(provider => ...)
Creates a new Math::Geometry::Construction::Vector
object and initializes attributes. This is the default Moose constructor.
Public Attributes
provider
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.
Methods
value
Returns a Math::Vector::Real object as described in the DESCRIPTION section.
AUTHOR
Lutz Gehlen, <perl at lutzgehlen.de>
LICENSE AND COPYRIGHT
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.