An open API service indexing awesome lists of open source software.

https://github.com/dnmfarrell/math-shape-grid

2d grid for printing Math::Shape::Point objects
https://github.com/dnmfarrell/math-shape-grid

Last synced: 9 months ago
JSON representation

2d grid for printing Math::Shape::Point objects

Awesome Lists containing this project

README

          

=pod

=encoding UTF-8

=head1 NAME

Math::Shape::Grid - a 2d grid for visualizing Math::Shape::Point objects on the terminal

=head1 VERSION

version 0.03

=head1 SYNOPSIS

my $p1 = Math::Shape::Point->new(1, 1, 0);
my $p2 = Math::Shape::Point->new(2, 2, 0);
my $p3 = Math::Shape::Point->new(3, 3, 0);

Math::Shape::Grid::print({ p1 => $p1, p2 => $p2, p3 => $p3 });

# prints:
p1 x: 1, y: 1, r: 0
p2 x: 2, y: 2, r: 0
p3 x: 3, y: 3, r: 0

-5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 x
8 . . . . . . . . . . . . . .
7 . . . . . . . . . . . . . .
6 . . . . . . . . . . . . . .
5 . . . . . . . . . . . . . .
4 . . . . . . . . . . . . . .
3 . . . . . . . . p3 . . . . .
2 . . . . . . . p2 . . . . . .
1 . . . . . . p1 . . . . . . .
0 . . . . . . . . . . . . . .
-1 . . . . . . . . . . . . . .
-2 . . . . . . . . . . . . . .
-3 . . . . . . . . . . . . . .
-4 . . . . . . . . . . . . . .
-5 . . . . . . . . . . . . . .
y

=for HTML
Coverage Status

=head1 FUNCTIONS

=head2 print

Prints a grid to STDOUT. Requires a hashref of L objects.

Math::Shape::Grid::print($points);

=head1 REPOSITORY

L

=head1 AUTHOR

David Farrell

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by David Farrell.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut