1 package LaTeX::TikZ::Tools;
8 LaTeX::TikZ::Tools - Miscellanous tools for LaTeX::TikZ classes.
16 our $VERSION = '0.01';
18 use Any::Moose 'Util::TypeConstraints' => [ 'find_type_constraint' ];
26 use constant EPS => 1e-10;
34 sub numeq { abs($_[0] - $_[1]) < EPS }
40 sub numcmp { $_[0] < $_[1] - EPS ? -1 : $_[0] > $_[1] + EPS ? 1 : 0 }
49 $x + EPS < $i + 0.5 ? $i : $i + 1;
52 =head2 C<type_constraint $class>
54 Find the type constraint for C<$class> by loading the relevant F<.pm> file beforehand.
66 find_type_constraint($class);
75 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
77 You can contact me by mail or on C<irc.perl.org> (vincent).
81 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>.
82 I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
86 You can find documentation for this module with the perldoc command.
90 =head1 COPYRIGHT & LICENSE
92 Copyright 2010 Vincent Pit, all rights reserved.
94 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
98 1; # End of LaTeX::TikZ::Tools