SPVM::Point3D - Point 3D
use Point3D; my $point = Point3D->new; my $point = Point3D->new(1, 2, 3); $point->set_x(1); $point->set_y(2); $point->set_z(3); my $x = $point->x; my $y = $point->y; my $z = $point->z; my $point_string = $point->to_string;
Point3D is a class for a point 3D.
Point3D
Point is the super class of Point3D.
Point3D inherits the interfaces of Point.
Point3D inherits the fields of Point.
has z : rw int;
z.
z
static method new : Point3D ($x = 0 : int, $y = 0 : int, $z = 0 : int)
Create a new Point3D object with x, y, and "z".
method new_xyz : Point3D ($x : int, $y : int, $z : int)
The alias for the following code using "new"
my $point = Point3D->new($x, $y, $z);
This method is deprecated and will be removed after 2022-09-03.
Point3D inherits the instance methods of Point.
method clear : void ()
Set x, y, and "z" to 0.
0
method cloneable_clone : object ()
Create a new Point3D object that clones myself.
method to_string : string ();
Stringify the Point3D object as the following format.
(1,2,3)
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.