Line

A representation of a line segment.

  • Line()
  • Line(a: Vec2, b: Vec2)
  • Line(a: Vec2, bx: float, by: float)
  • Line(ax: float, ay: float, b: Vec2)
  • Line(ax: float, ay: float, bx: float, by: float)

Properties


NameDescriptionType
aThe starting point of the lineVec2
bThe ending point of the lineVec2
axThe x-coordinate of the starting pointfloat
ayThe y-coordinate of the starting pointfloat
bxThe x-coordinate of the ending pointfloat
byThe y-coordinate of the ending pointfloat
lengthThe length of the linefloat

Methods


Move

move(offset: Vec2) None

Move the line by a specified offset.

Parameters

  • offset : The offset to move the line by.

Copy

copy() Line

Create a copy of the line.