SPVM::Point3D(3)

πŸ“¦ version 0.990125, in alpine 3.24

πŸ’– 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 $a and $b are defined and the "x" and "y" fields in $a equal the "x" and "y" fields in $b, returns 1.
  • If only $a is not defined, returns 0.
  • If only $b is not defined, returns 0.
  • If both $a and $b are not defined, returns 1.

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