Geometry::Primitive::Line(3pm)

Geometry::Primitive::Line3pm

A line

Usage

  use Geometry::Primitive::Line;
  my $line = Geometry::Primitive::Line->new();
  $line->start($point1);
  $line->end($point2);

Overview

Geometry::Primitive::Line represents a straight curve defined by two points.

Attributes

end

Set/Get the end point of the line.

start

Set/Get the start point of the line.

Methods

new

Creates a new Geometry::Primitive::Line

contains_point

Returns true if the supplied point is 'on' the line. Accepts either a point object or an x y pair.

grow

Does nothing, as I'm not sure how. Patches or hints welcome.

is_parallel ($other_line)

Returns true if the supplied line is parallel to this one.

is_perpendicular ($other_line)

Returns true if the supplied line is perpendicular to this one.

length

Get the length of the line.

point_end

Get the end point. Provided for Shape role.

point_start

Get the start point. Provided for Shape role.

scale

Does nothing at the moment.

slope

Get the slope of the line.

to_string

Guess!

y_intercept

Returns the Y intercept of this line.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 3 times.

  1. 6.0–7
  2. 8–9
  3. 10–11
  4. 12–13

Author

Cory Watson <[email protected]>

From libgeometry-primitive-perl 0.24-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.