Geomet...e::Arc(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::Arc πŸ’–

okay bestie, so this is a page from the User Contributed Perl Documentation set, and it's all about Geometry::Primitive::Arc β€” yes the name got squished to Geomet...e::Arc up in the header because terminals are dramatic like that, but it's the same thing, promise 🫢


✨ NAME ✨

Geometry::Primitive::Arc β€” literally just a portion of the circumference of a Circle. that's it. that's the whole vibe. a little slice of the curve πŸŽ€


🌸 DESCRIPTION 🌸

so Geometry::Primitive::Arc represents a closed segment of a curve. it's giving "arc" in the math sense, not in the "story arc" sense, but honestly both are iconic πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

here's how you'd actually use it, no cap:

use Geometry::Primitive::Arc;

my $arc = Geometry::Primitive::Arc->new(
    angle_start => 0,
    angle_end => 1.57079633,
    radius => 15
);

look at that. angles in radians, a radius, boom. you have an arc ✨


πŸ‘‘ ATTRIBUTES πŸ‘‘

angle_start

the starting angle for this arc, in radians. this is where your arc wakes up in the morning πŸŒ…

angle_end

the ending angle for this arc, also in radians. this is where it goes to bed 😴

radius

returns the radius of the arc. the bigger the radius, the bigger the drama πŸ’«

origin

set/get the origin of this arc. it's the anchor, the home base, the main character of the coordinate system 🌈


πŸ”₯ METHODS πŸ”₯

new

creates a new Geometry::Primitive::Arc. fresh arc, fresh start, obsessed πŸŽ€

get_point_at_angle

give it an angle in radians and it hands back the point at that angle on this arc. but heads up β€” it returns undef if that angle falls outside this arc's range. so no, you can't just ask for any angle you want, bestie, respect the boundaries πŸ™ˆ

length

returns the length of this arc. how long is the curve? this tells you πŸ’«

point_end

get the end point. provided for the Shape role, so don't come for it 🫢

point_start

get the start point. also provided for the Shape role. they're a matching set, it's giving coordinated πŸ’…

scale ($amount)

increases the radius by multiplying it by the supplied $amount. so if you want it bigger, pass a bigger number. math is math ✨


🌈 AUTHOR 🌈

Cory Watson <gphat@cpan.org> β€” thank you for your service, legend πŸ‘‘


you can redistribute and/or modify this code under the same terms as Perl itself. periodt.


and that's the whole page, bestie πŸ’– it came from perl v5.36.0 and it's dated 2022-12-12 β€” so yeah, this lore is from the before-times, but it still slays. go make some arcs, you've got this πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from