« Construction/Derivate/IntersectionCircleCircle.pm
↑ Summary
Construction/Derivate/IntersectionLineLine.pm »
| 1 | package Math::Geometry::Construction::Role::Input; | ||||||||||
| 2 | 13 | ▶ | use Moose::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 13 | ▶ | use 5.008008; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 13 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 13 | ▶ | use Math::Vector::Real; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | =head1 NAME | ||||||||||
| 10 | |||||||||||
| 11 | C<Math::Geometry::Construction::Role::Input> - format conversions | ||||||||||
| 12 | |||||||||||
| 13 | =head1 VERSION | ||||||||||
| 14 | |||||||||||
| 15 | Version 0.024 | ||||||||||
| 16 | |||||||||||
| 17 | =cut | ||||||||||
| 18 | |||||||||||
| 19 | 13 | our $VERSION = '0.024'; | |||||||||
| 20 | |||||||||||
| 21 | |||||||||||
| 22 | # This method is also used during construction time, so $self might | ||||||||||
| 23 | # just be a class name. | ||||||||||
| 24 | 215 | ▶ | sub import_point { | ||||||||
|
Subroutine
import_point: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||
| 25 | 215 | my ($self, $construction, $value) = @_; | |||||||||
| 26 | |||||||||||
| 27 | croak "Invalid construction object." | ||||||||||
| 28 | 215 | ▶ | if(!eval { $construction->isa('Math::Geometry::Construction') }); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | |||||||||||
| 30 | 215 | ▶ | return undef if(!defined($value)); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | return $value | ||||||||||
| 32 | 214 | ▶ | if(eval { $value->isa('Math::Geometry::Construction::Point') }); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | 174 | return $construction->add_point(position => $value, hidden => 1); | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 13 | 1; | |||||||||
| 37 | |||||||||||
| 38 | |||||||||||
| 39 | __END__ | ||||||||||