NAME

Math::Shape::Rectangle - a 2d rectangle in cartesian space

VERSION

version 0.02

rotate

Requires a numerical argument in radians and turns the rectangle. Negative numbers rotate left and positive numbers rotate right.

use Math::Trig ':pi';
$rectangle->rotate(pip2); # turn half pi radians (90 degrees) right;
$rectangle->rotate(-pi); # turn pi radians (180 degrees) left;

get_points

Returns hashref of points.

INTERNAL METHODS

_calculate_corners

Creates the 4 point objects that represent the corners of the rectangle.

REPOSITORY

https://github.com/sillymoose/Math-Shape-Rectangle.git

AUTHOR

David Farrell <sillymoos@cpan.org>

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.