]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blob - lib/LaTeX/TikZ/Point/Math/Complex.pm
b09dbce86b05286c6490f6bae3487e4ed642ad76
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ / Point / Math / Complex.pm
1 package LaTeX::TikZ::Point::Math::Complex;
2
3 use strict;
4 use warnings;
5
6 =head1 NAME
7
8 LaTeX::TikZ::Point::Math::Complex - Coerce Math::Complex points into LaTeX::TikZ::Point objects.
9
10 =head1 VERSION
11
12 Version 0.01
13
14 =cut
15
16 our $VERSION = '0.01';
17
18 use Math::Complex;
19
20 use LaTeX::TikZ::Point;
21
22 use Any::Moose 'Util::TypeConstraints' => [ qw/
23  class_type
24  coerce
25  from
26  via
27 / ];
28
29 my $mc_tc = class_type 'Math::Complex';
30
31 coerce 'LaTeX::TikZ::Point::Autocoerce'
32     => from 'Math::Complex'
33     => via { LaTeX::TikZ::Point->new(x => $_->Re, y => $_->Im); };
34
35 =head1 AUTHOR
36
37 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
38
39 You can contact me by mail or on C<irc.perl.org> (vincent).
40
41 =head1 BUGS
42
43 Please report any bugs or feature requests to C<bug-latex-tikz at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=LaTeX-TikZ>.
44 I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
45
46 =head1 SUPPORT
47
48 You can find documentation for this module with the perldoc command.
49
50     perldoc LaTeX::TikZ
51
52 =head1 COPYRIGHT & LICENSE
53
54 Copyright 2010 Vincent Pit, all rights reserved.
55
56 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
57
58 =cut
59
60 1; # End of LaTeX::TikZ::Point::Math::Complex