Geomet...tangle(3pm)
β¨ Geometry::Primitive::Rectangle β it's giving quadrilateral π
okay bestie, so this is a page from the User Contributed Perl Documentation (that's the manual name, we're not typing the whole truncated Geomet...tangle(3pm) header thing, that's just the terminal being dramatic about long names). The actual module is Geometry::Primitive::Rectangle, and yes, she's a whole entire shape. π
πΈ NAME πΈ
Geometry::Primitive::Rectangle β a 4 sided polygon. that's it. that's the girl. π₯
π¦ DESCRIPTION π¦
Geometry::Primitive::Rectangle is a space defined by a point, a width and a height. three things. that's the whole personality. a point, a width, a height, and vibes. β¨
π SYNOPSIS π
here's how you summon her, no cap:
use Geometry::Primitive::Rectangle;
my $poly = Geometry::Primitive::Rectangle->new();
$poly->add_point($point1);
$poly->height(100);
$poly->width(100);
see how we make her, give her a point, then tell her how tall and how wide she is? main character behavior fr fr. π
π ATTRIBUTES π
height
Set/Get the height of this Rectangle. yes, how tall. that's the whole thing. π
origin
Set/Get the origin of this rectangle. where she starts, where she comes from, her roots, her origin story. π«Ά
width
Set/Get the width of this Rectangle. and how wide. the other dimension. iconic. π
π METHODS π
new
Creates a new Geometry::Primitive::Rectangle. brand new rectangle, fresh out the box, no notes. β¨
area
Returns the area of this rectangle. the math is mathing. π₯
get_points
Get the points that make up this Rectangle. all of them. the whole point situation. π¦
point_end
Get the end point. Returns the origin. Provided for Shape role. so like, the end point is literally just the origin, and that's on purpose, because the Shape role needs it. iykyk. π
point_start
Get the start point. Returns the origin. Provided for Shape role. same energy, same origin, also for the Shape role. she's consistent bestie. π
scale ($amount)
Scales the hieght and width of this rectangle by the amount specified. (yes the original spells it hieght, we're leaving that little easter egg right where it is, do not perceive me π) β anyway, she takes $amount and scales both the height and the width by it. one number, two dimensions, slay. β
π AUTHOR π
Cory Watson <gphat@cpan.org> β the actual legend who wrote this. give her her flowers. πΈ
π COPYRIGHT & LICENSE π
You can redistribute and/or modify this code under the same terms as Perl itself. so like, go off, remix it, just keep it under the same terms as Perl. that's the deal, periodt. π
ok that's the whole page bestie, you're officially a rectangle understander now π«Ά
this was perl v5.36.0, dated 2022-12-12 β shoutout to the docs, mwah, bye bye π
β¨
π¦ where this page comes from
- debian bookworm: libgeometry-primitive-perl 0.24-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libgeometry-primitive-perl 0.24-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgeometry-primitive-perl 0.24-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgeometry-primitive-perl 0.24-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgeometry-primitive-perl 0.24-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms