SPVM::Point(3)
π NAME π
Hey bestie, welcome to the SPVM::Point(3) page from the User Contributed Perl Documentation. The manual name is SPVM::Point, and the actual name is SPVM::Point - Point β itβs giving tiny point-class main character energy. β¨
π«Ά USAGE π«Ά
Use it like this, no cap:
use Point;
my $point = Point->new;
my $point = Point->new(1, 2);
my $x = $point->x;
my $y = $point->y;
my $point_string = $point->to_string;
π¦ DESCRIPTION π¦
Point is a class for a point. Thatβs the whole vibe. π
π INTERFACES π
The Point class has the following interfaces, periodt:
StringableCloneableEqualityCheckable
πΈ FIELDS πΈ
x
The declaration is exactly this, bestie:
has x : protected ro int;
This field is x.
y
Same energy, different coordinate:
has y : protected ro int;
This field is y.
π CLASS METHODS π
new
static method new : Point ($x : int = 0, $y : int = 0);
Creates a new Point object with $x and $y. Slay. β¨
π§ INSTANCE METHODS π§
init
protected method init : Point ($x : int = 0, $y : int = 0)
Initializes x and y.
clear
method clear : void ();
Sets x and y to 0.
clone
method clone : Point ();
Creates a new Point object that clones myself.
to_string
method to_string : string ();
Stringifies a Point object as the following format:
(1,2)
eq
method eq : int ($a : Point, $b : Point);
If $a is equal to $b, returns 1, otherwise returns 0.
Implementation:
- If
$aand$bis defined andx,y, andzfields in$aare equals tox,y, andzfields in$b, returns1. - If only
$ais not defined, returns0. - If only
$bis not defined, returns0. - If both
$aand$bis not defined, returns1.
Keeping that z mention exactly as written, bestie β facts are facts. π
π COPYRIGHT & LICENSE π
Copyright (c) 2023 Yuki Kimoto
MIT License
Catch you later, bestie β this page is from perl v5.42.2, dated 2026-02-03. π«Άπ
π¦ 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