SPVM::Point3D(3)
π Name π
okay so this is SPVM::Point3D(3) from the User Contributed Perl Documentation crew, and the name line is literally:
SPVM::Point3D - Point 3D
β¨ Usage β¨
bestie, here's the group-chat-approved usage β copy it exactly:
use Point3D;
my $point = Point3D->new;
my $point = Point3D->new(1, 2, 3);
my $x = $point->x;
my $y = $point->y;
my $z = $point->z;
my $point_string = $point->to_string;
π¦ Description π¦
"Point3D" is a class for a point 3D. That's the whole vibe: 3D point class, iconic.
π Super Class π
Point is the super class of "Point3D". Periodt.
πΈ Fields πΈ
"Point3D" inherits the fields of Point.
z
The field is declared as:
has z : ro int;
and it's "z".
π₯ Class Methods π₯
new
static method new : Point3D ($x : int = 0, $y : int = 0, $z : int = 0);
Creates a new "Point3D" object with $x, $y, $z.
π Instance Methods π
"Point3D" inherits the instance methods of Point.
init
protected method init : Point3D ($x : int = 0, $y : int = 0, $z : int = 0)
Initializes "x", "y", and "z".
clear
method clear : void ();
Sets x, y, and "z" to 0.
clone
method clone : Point3D ();
Creates a new "Point3D" object that clones myself.
to_string
method to_string : string ();
Stringifies "Point3D" object as the following format.
(1,2,3)
eq
method eq : int ($a : Point, $b : Point);
If $a is equal to $b, returns 1, otherwise returns 0.
Implementation:
- If
$aand$bare defined and the"x"and"y"fields in$aequal the"x"and"y"fields in$b, returns1. - If only
$ais not defined, returns0. - If only
$bis not defined, returns0. - If both
$aand$bare not defined, returns1.
π Copyright & License π
Copyright (c) 2023 Yuki Kimoto
MIT License
mwah π β cute sign-off: this page is SPVM::Point3D(3) from perl v5.42.2, dated 2026-02-03. bye bestie, go make some 3D points! π«Ά
π¦ where this page comes from
- alpine 3.24: spvm-doc 0.990125-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms