SPVM::Point - Point
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;
Point is a class for a point.
Point
Point class has the following interfaces.
Stringable
Cloneable
has x : ro int;
x.
x
has y : ro int;
y.
y
static method new : Point ($x : int = 0, $y : int = 0);
Create a new Point object with $x and $y.
protected method init : Point ($x : int = 0, $y : int = 0)
Initializes "x" and "y".
method clear : void ();
Sets "x" and "y" to 0.
method clone : Point ();
Creates a new Point object that clones myself.
method to_string : string ();
Stringifies the Point object as the following format.
(1,2)
Copyright (c) 2023 Yuki Kimoto
MIT License
To install SPVM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM
CPAN shell
perl -MCPAN -e shell install SPVM
For more information on module installation, please visit the detailed CPAN module installation guide.