# LineSeg

final class LineSeg(val startX: Double, val startY: Double, val endX: Double, val endY: Double) extends LineLike with CurveSeg with Show2[Pt2, Pt2] with Dbl4Elem with AffinePreserve

Straight line segment. A straight line in every day terminology. Mathematically: 2 dimensional directed, line segment. The name was chosen to avoid ambiguity.

Companion
object
trait Dbl4Elem
trait DblNElem
trait SpecialT
trait Show2[Pt2, Pt2]
trait Show
trait CurveSeg
trait Drawable
trait LineLike
trait GeomElem
class Object
trait Matchable
class Any

## Type members

### Types

override type ThisT

## Value members

### Concrete methods

def angle

The angle of this line segment.

The angle of this line segment.

override def dbl1: Double
Definition Classes
override def dbl2: Double
Definition Classes
override def dbl3: Double
Definition Classes
override def dbl4: Double
Definition Classes
def draw(colour: Colour, lineWidth: Double): LineSegDraw
def endPt: Pt2
def endToLeft(distFromEnd: Double): Pt2

Gives the Vec2 point at the specified distance to the left of the end point. At the end point turn left 90 degrees and then travel the given distance to the point. The Vec2 of that point is returned by this method.

Gives the Vec2 point at the specified distance to the left of the end point. At the end point turn left 90 degrees and then travel the given distance to the point. The Vec2 of that point is returned by this method.

def endToRight(distFromEnd: Double): Pt2

Gives the Vec2 point at the specified distance to the right of the end point. At the end point turn right 90 degrees and then travel the given distance to the point. The Vec2 of that point is returned by this method.

Gives the Vec2 point at the specified distance to the right of the end point. At the end point turn right 90 degrees and then travel the given distance to the point. The Vec2 of that point is returned by this method.

def func4Dou[T](f: (Double, Double, Double, Double) => T): T
def isHorizontal: Boolean
def isVertical: Boolean
def left90

The angle 90 degrees anti-clock wise from the angle of this directed line segment. The angle one gets by turning left from this Sline.

The angle 90 degrees anti-clock wise from the angle of this directed line segment. The angle one gets by turning left from this Sline.

@inline
def length: Double
def midPt: Pt2

The mid or half way point of this lineSeg.

The mid or half way point of this lineSeg.

def midPtToLeft(distFromMidPt: Double): Pt2

Gives the Vec2 point at the specified distance to the left of the mid point. At the mid point turn left 90 degrees and then travel the given distance to the point. The Vec2 of that point is returned by this method.

Gives the Vec2 point at the specified distance to the left of the mid point. At the mid point turn left 90 degrees and then travel the given distance to the point. The Vec2 of that point is returned by this method.

def midPtToRight(distFromMidPt: Double): Pt2

Gives the Vec2 point at the specified distance to the right of the mid point. At the mid point turn right 90 degrees and then travel the given distance to the point. The Vec2 of that point is returned by this method.

Gives the Vec2 point at the specified distance to the right of the mid point. At the mid point turn right 90 degrees and then travel the given distance to the point. The Vec2 of that point is returned by this method.

def mirrorPt(pt: Pt2): Pt2
override def name1: String
Definition Classes
override def name2: String
Definition Classes
def ptsTrans(f: Pt2 => Pt2): LineSeg
def rayIntersection(pt: Pt2): Boolean

Checks whether a forward horizontal ray crosses this polygon side.

Checks whether a forward horizontal ray crosses this polygon side.

def revVec: Vec2

The relative vector Vec2 of the start point from the end point.

The relative vector Vec2 of the start point from the end point.

def right90

The angle 90 degrees clock wise from the angle of this line segment. The angle one gets by turning from from this Sline.

The angle 90 degrees clock wise from the angle of this line segment. The angle one gets by turning from from this Sline.

def shortArray: Array[Short]
override def show1: Pt2
Definition Classes
override def show2: Pt2
Definition Classes
def startPt: Pt2
def startToLeft(distFromStart: Double): Pt2

Gives the Vec2 point at the specified distance to the left of the start point. At the start point turn left 90 degrees and then travel the given distance to the point. The Vec2 of that point is returned by this method.

Gives the Vec2 point at the specified distance to the left of the start point. At the start point turn left 90 degrees and then travel the given distance to the point. The Vec2 of that point is returned by this method.

def startToRight(distFromStart: Double): Pt2

Gives the Vec2 point at the specified distance to the right of the start point. At the start point turn right 90 degrees and then travel the given distance to the point. The Vec2 of that point is returned by this method.

Gives the Vec2 point at the specified distance to the right of the start point. At the start point turn right 90 degrees and then travel the given distance to the point. The Vec2 of that point is returned by this method.

override def syntaxdepth: Int
Definition Classes
override def typeStr: String
Definition Classes
def vec: Vec2

The relative vector Vec2 of the end point from the start point.

The relative vector Vec2 of the end point from the start point.

def withArrow(colour: Colour, lineWidth: Double): GraphicElems

### Inherited methods

Inherited from
Show2
Inherited from
Show2
override def negX
Definition Classes
Inherited from
SimilarPreserve
override def negY
Definition Classes
Inherited from
SimilarPreserve
final def pEnd: Pt2

The end point Pt2 of this curve segment. Often called p2 on a line or p4 on a cubic bezier in other APIs.

The end point Pt2 of this curve segment. Often called p2 on a line or p4 on a cubic bezier in other APIs.

Inherited from
CurveSeg
final def pStart: Pt2

Start point of this curve segment, often called p1

Start point of this curve segment, often called p1

Inherited from
CurveSeg
override def prolign(matrix: ProlignMatrix): ThisT
Definition Classes
Inherited from
ProlignPreserve
override def reflect(lineLike: LineLike): ThisT
Definition Classes
Inherited from
SimilarPreserve
override def rotate(angle: AngleVec): ThisT
Definition Classes
Inherited from
SimilarPreserve
override def rotate180
Definition Classes
Inherited from
SimilarPreserve
override def rotate270
Definition Classes
Inherited from
SimilarPreserve
override def rotate90
Definition Classes
Inherited from
SimilarPreserve
override def scale(operand: Double): ThisT
Definition Classes
Inherited from
ProlignPreserve
override def scaleXY(xOperand: Double, yOperand: Double): ThisT
Definition Classes
Inherited from
AffinePreserve
override def shearX(operand: Double): ThisT
Definition Classes
Inherited from
AffinePreserve
override def shearY(operand: Double): ThisT
Definition Classes
Inherited from
AffinePreserve
override def show(way: Way, maxPlaces: Int, minPlaces: Int): String
Definition Classes
Inherited from
ShowProduct
def shows(way: Way, decimalPlaces: Int): Strings
Inherited from
Show2
override def slateXY(xDelta: Double, yDelta: Double): ThisT
Definition Classes
Inherited from
ProlignPreserve
override def str: String
Definition Classes
Inherited from
ShowProduct
final override def toString: String
Definition Classes
Show -> Any
Inherited from
Show

### Concrete fields

val endX: Double
val endY: Double
val startX: Double
val startY: Double

## Implicits

### Implicits

implicit override def showT1: ShowT[Pt2]
Definition Classes
implicit override def showT2: ShowT[Pt2]
Definition Classes