Geomet...tangle(3pm)

πŸ“¦
version 0.24 Β· 2 versions
  • 0.24 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.24 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ 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. 🌸


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