euclid.ts

2D Euclidean geometry classes, utilities, and drawing tools.

Angle


ClassAngle

A 2-dimensional angle class, defined by three points.

constructor

  • new Angle(a: Point, b: Point, c: Point): Angle
  • Parameters

    • true a: Point
    • true b: Point
    • true c: Point

    Returns Angle

Propertya

Propertyb

Propertyc

Propertytype

Accessorarc

Returns the Arc element corresponding to this angle.

  • get arc()

Accessorbisector

The bisector of this angle.

  • get bisector()

Accessordeg

The size, in degrees, of this angle.

  • get deg()

AccessorisRight

Checks if this angle is right-angled.

  • get isRight()

Accessorrad

The size, in radians, of this angle.

  • get rad()

Accessorsup

Returns the smaller one of this and its supplementary angle.

  • get sup()

Methodat

  • at(): Point
  • Returns Point

Methodcontains

  • contains(): boolean
  • Returns boolean

Methodequals

  • equals(_a: Angle): boolean
  • Parameters

    • true _a: Angle

    Returns boolean

Methodproject

  • project(): Point
  • Returns Point

Methodreflect

  • reflect(l: Line): Angle
  • Parameters

    • true l: Line

    Returns Angle

Methodrotate

  • rotate(a: number, c?: SimplePoint): Angle
  • Parameters

    • true a: number
    • true true c: SimplePoint

    Returns Angle

Methodscale

  • scale(sx: number, sy?: number): Angle
  • Parameters

    • true sx: number
    • true sy: number = sx

    Returns Angle

Methodshift

  • shift(x: number, y?: number): Angle
  • Parameters

    • true x: number
    • true y: number = x

    Returns Angle

Methodtransform

  • transform(m: TransformMatrix): Angle
  • Parameters

    • true m: TransformMatrix

    Returns Angle

Methodtranslate

  • translate(p: Point): Angle
  • Parameters

    • true p: Point

    Returns Angle

Arc


ClassArc

An arc segment of a circle, with given center, start point and angle.

constructor

  • new Arc(c: Point, start: Point, angle: number): Arc
  • Parameters

    • true c: Point
    • true start: Point
    • true angle: number

    Returns Arc

Propertyangle

Propertyc

Propertystart

Propertytype

Accessorcenter

  • get center()

Accessorend

  • get end()

Accessormajor

  • get major()

Accessorminor

  • get minor()

Accessorradius

  • get radius()

AccessorstartAngle

  • get startAngle()

Methodat

  • at(t: number): Point
  • Parameters

    • true t: number

    Returns Point

Methodcontains

  • contains(_p: Point): boolean
  • Parameters

    • true _p: Point

    Returns boolean

Methodcontract

  • contract(p: number): this
  • Parameters

    • true p: number

    Returns this

Methodequals

  • equals(): boolean
  • Returns boolean

Methodproject

  • project(p: Point): Point
  • Parameters

    • true p: Point

    Returns Point

Methodreflect

  • reflect(l: Line): this
  • Parameters

    • true l: Line

    Returns this

Methodrotate

  • rotate(a: number, c?: Point): this
  • Parameters

    • true a: number
    • true c: Point = ORIGIN

    Returns this

Methodscale

  • scale(sx: number, sy?: number): this
  • Parameters

    • true sx: number
    • true sy: number = sx

    Returns this

Methodshift

  • shift(x: number, y?: number): this
  • Parameters

    • true x: number
    • true y: number = x

    Returns this

Methodtransform

  • transform(m: TransformMatrix): this
  • Parameters

    • true m: TransformMatrix

    Returns this

Methodtranslate

  • translate(p: Point): this
  • Parameters

    • true p: Point

    Returns this


ClassSector

Propertytype

Bounds


ClassBounds

constructor

  • new Bounds(xMin: number, xMax: number, yMin: number, yMax: number): Bounds
  • Parameters

    • true xMin: number
    • true xMax: number
    • true yMin: number
    • true yMax: number

    Returns Bounds

PropertyxMax

PropertyxMin

PropertyyMax

PropertyyMin

Accessordx

  • get dx()

Accessordy

  • get dy()

Accessorrect

  • get rect()

AccessorxRange

  • get xRange()

AccessoryRange

  • get yRange()

Circle


ClassCircle

A circle with a given center and radius.

constructor

  • new Circle(c?: Point, r?: number): Circle
  • Parameters

    • true c: Point = ORIGIN
    • true r: number = 1

    Returns Circle

Propertyc

Propertyr

Propertytype

Accessorarc

  • get arc()

Accessorarea

The area of this circle.

  • get area()

Accessorcircumference

The length of the circumference of this circle.

  • get circumference()

Methodat

  • at(t: number): Point
  • Parameters

    • true t: number

    Returns Point

Methodcontains

  • contains(p: Point): boolean
  • Parameters

    • true p: Point

    Returns boolean

Methodequals

  • equals(other: Circle): boolean
  • Parameters

    • true other: Circle

    Returns boolean

Methodproject

  • project(p: Point): Point
  • Parameters

    • true p: Point

    Returns Point

Methodreflect

  • reflect(l: Line): Circle
  • Parameters

    • true l: Line

    Returns Circle

Methodrotate

  • rotate(a: number, c?: Point): Circle
  • Parameters

    • true a: number
    • true c: Point = ORIGIN

    Returns Circle

Methodscale

  • scale(sx: number, sy?: number): Circle
  • Parameters

    • true sx: number
    • true sy: number = sx

    Returns Circle

Methodshift

  • shift(x: number, y?: number): Circle
  • Parameters

    • true x: number
    • true y: number = x

    Returns Circle

MethodtangentAt

  • tangentAt(t: number): Line
  • Parameters

    • true t: number

    Returns Line

Methodtransform

  • transform(m: TransformMatrix): Circle
  • Parameters

    • true m: TransformMatrix

    Returns Circle

Methodtranslate

  • translate(p: Point): Circle
  • Parameters

    • true p: Point

    Returns Circle

Draw Canvas


InterfaceCanvasDrawingOptions

Propertyfill

PropertylineCap

PropertylineJoin

Propertyopacity

Propertystroke

PropertystrokeWidth


FunctiondrawCanvas

  • drawCanvas(ctx: CanvasRenderingContext2D, obj: GeoElement, options?: CanvasDrawingOptions): void
  • Parameters

    • true ctx: CanvasRenderingContext2D
    • true obj: GeoElement
    • true options: CanvasDrawingOptions = {}

    Returns void

Draw Svg


InterfaceSVGDrawingOptions

Propertyarrows

Propertybox

Propertyfill

Propertymark

Propertyround

Propertysize


Type aliasLineArrow


Type aliasLineMark


FunctionangleSize

  • angleSize(angle: Angle, options?: SVGDrawingOptions): number
  • Parameters

    • true angle: Angle
    • true options: SVGDrawingOptions = {}

    Returns number


FunctiondrawSVG

  • drawSVG(obj: GeoElement, options?: SVGDrawingOptions): string
  • Parameters

    • true obj: GeoElement
    • true options: SVGDrawingOptions = {}

    Returns string

Ellipse


ClassEllipse

constructor

  • new Ellipse(c: Point, a: number, b: number): Ellipse
  • Parameters

    • true c: Point
    • true a: number
    • true b: number

    Returns Ellipse

Propertya

Propertyb

Propertyc

Propertyf1

Propertyf2

Propertytype

Methodat

  • at(t: number): Point
  • Parameters

    • true t: number

    Returns Point

Methodcontains

  • contains(_p: Point): boolean
  • Parameters

    • true _p: Point

    Returns boolean

Methodequals

  • equals(): boolean
  • Returns boolean

Methodintersect

  • intersect(line: Line): Point[]
  • Parameters

    • true line: Line

    Returns Point[]

MethodnormalAt

  • normalAt(p: Point): Line
  • Parameters

    • true p: Point

    Returns Line

Methodproject

  • project(p: Point): Point
  • Parameters

    • true p: Point

    Returns Point

Methodreflect

  • reflect(_l: Line): this
  • Parameters

    • true _l: Line

    Returns this

Methodrotate

  • rotate(_a: number, _c?: Point): this
  • Parameters

    • true _a: number
    • true _c: Point = ORIGIN

    Returns this

Methodscale

  • scale(_sx: number, _sy?: number): this
  • Parameters

    • true _sx: number
    • true _sy: number = _sx

    Returns this

Methodshift

  • shift(_x: number, _y?: number): this
  • Parameters

    • true _x: number
    • true _y: number = _x

    Returns this

Methodtransform

  • transform(_m: TransformMatrix): this
  • Parameters

    • true _m: TransformMatrix

    Returns this

Methodtranslate

  • translate(_p: Point): this
  • Parameters

    • true _p: Point

    Returns this

staticMethodfromFoci

  • fromFoci(f1: Point, f2: Point, stringLength: number): Ellipse
  • Parameters

    • true f1: Point
    • true f2: Point
    • true stringLength: number

    Returns Ellipse

Intersection


Functionintersections

  • intersections(...elements: GeoShape[]): Point[]
  • Parameters

    • true true ...elements: GeoShape[]

    Returns Point[]

Line


ClassLine

An infinite straight line that goes through two points.

constructor

  • new Line(p1: Point, p2: Point): Line
  • Parameters

    • true p1: Point
    • true p2: Point

    Returns Line

Propertyp1

Propertyp2

Propertytype

Accessorangle

The angle formed between this line and the x-axis.

  • get angle()

Accessorintercept

The y-axis intercept of this line.

  • get intercept()

Accessorlength

  • get length()

AccessorlengthSquared

  • get lengthSquared()

Accessormidpoint

The midpoint of this line.

  • get midpoint()

AccessorperpendicularBisector

The perpendicular bisector of this line.

  • get perpendicularBisector()

AccessorperpendicularVector

The point representing the perpendicular vector of this line.

  • get perpendicularVector()

Accessorslope

The slope of this line.

  • get slope()

AccessorunitVector

The point representing a unit vector along this line.

  • get unitVector()

Methodat

  • at(t: number): Point
  • Parameters

    • true t: number

    Returns Point

Methodcontains

  • contains(p: Point): boolean
  • Parameters

    • true p: Point

    Returns boolean

MethoddistanceSquared

  • distanceSquared(p: Point): number
  • Parameters

    • true p: Point

    Returns number

Methodequals

  • equals(other: Line): boolean
  • Parameters

    • true other: Line

    Returns boolean

Methodmake

  • make(p1: Point, p2: Point): Line
  • Parameters

    • true p1: Point
    • true p2: Point

    Returns Line

Methodparallel

  • parallel(p: Point): Line
  • Parameters

    • true p: Point

    Returns Line

Methodperpendicular

  • perpendicular(p: Point): Line
  • Parameters

    • true p: Point

    Returns Line

Methodproject

  • project(p: SimplePoint): Point
  • Parameters

    • true p: SimplePoint

    Returns Point

Methodreflect

  • reflect(l: Line): this
  • Parameters

    • true l: Line

    Returns this

Methodrotate

  • rotate(a: number, c?: Point): this
  • Parameters

    • true a: number
    • true c: Point = ORIGIN

    Returns this

Methodscale

  • scale(sx: number, sy?: number): Line
  • Parameters

    • true sx: number
    • true sy: number = sx

    Returns Line

Methodshift

  • shift(x: number, y?: number): Line
  • Parameters

    • true x: number
    • true y: number = x

    Returns Line

Methodtransform

  • transform(m: TransformMatrix): this
  • Parameters

    • true m: TransformMatrix

    Returns this

Methodtranslate

  • translate(p: Point): Line
  • Parameters

    • true p: Point

    Returns Line


ClassRay

An infinite ray defined by an endpoint and another point on the ray.

Propertytype

Methodequals

  • equals(other: Ray): boolean
  • Parameters

    • true other: Ray

    Returns boolean

Methodmake

  • make(p1: Point, p2: Point): Ray
  • Parameters

    • true p1: Point
    • true p2: Point

    Returns Ray


ClassSegment

A finite line segment defined by its two endpoints.

Propertytype

Methodcontains

  • contains(p: Point): boolean
  • Parameters

    • true p: Point

    Returns boolean

Methodcontract

  • contract(x: number): Segment
  • Parameters

    • true x: number

    Returns Segment

Methodequals

  • equals(other: Segment, oriented?: boolean): boolean
  • Parameters

    • true other: Segment
    • true oriented: boolean = false

    Returns boolean

Methodmake

  • make(p1: Point, p2: Point): Segment
  • Parameters

    • true p1: Point
    • true p2: Point

    Returns Segment

Methodproject

  • project(p: SimplePoint): Point
  • Parameters

    • true p: SimplePoint

    Returns Point

Point


ClassPoint

A single point class defined by two coordinates x and y.

constructor

  • new Point(x?: number, y?: number): Point
  • Parameters

    • true x: number = 0
    • true y: number = 0

    Returns Point

Propertytype

Propertyx

Propertyy

Accessorarray

  • get array()

Accessorflip

  • get flip()

Accessorinverse

  • get inverse()

Accessorlength

  • get length()

Accessorperpendicular

  • get perpendicular()

AccessorunitVector

  • get unitVector()

Methodadd

  • add(p: SimplePoint): Point
  • Parameters

    • true p: SimplePoint

    Returns Point

Methodangle

  • angle(c?: Point): number
  • Parameters

    • true c: Point = ORIGIN

    Returns number

MethodchangeCoordinates

  • changeCoordinates(originCoords: Bounds, targetCoords: Bounds): Point
  • Parameters

    • true originCoords: Bounds
    • true targetCoords: Bounds

    Returns Point

Methodclamp

  • clamp(bounds: Bounds, padding?: number): Point
  • Parameters

    • true bounds: Bounds
    • true padding: number = 0

    Returns Point

MethoddistanceFromLine

  • distanceFromLine(l: Line): number
  • Parameters

    • true l: Line

    Returns number

Methodequals

  • equals(other: any): boolean
  • Parameters

    • true other: any

    Returns boolean

Methodfloor

  • floor(): Point
  • Returns Point

Methodmod

  • mod(x: number, y?: number): Point
  • Parameters

    • true x: number
    • true y: number = x

    Returns Point

Methodreflect

  • reflect(l: Line): Point
  • Parameters

    • true l: Line

    Returns Point

Methodrotate

  • rotate(angle: number, c?: SimplePoint): Point
  • Parameters

    • true angle: number
    • true c: SimplePoint = ORIGIN

    Returns Point

Methodround

  • round(inc?: number): Point
  • Parameters

    • true inc: number = 1

    Returns Point

Methodscale

  • scale(sx: number, sy?: number): Point
  • Parameters

    • true sx: number
    • true sy: number = sx

    Returns Point

Methodshift

  • shift(x: number, y?: number): Point
  • Parameters

    • true x: number
    • true y: number = x

    Returns Point

Methodsubtract

  • subtract(p: SimplePoint): Point
  • Parameters

    • true p: SimplePoint

    Returns Point

Methodtransform

  • transform(m: TransformMatrix): Point
  • Parameters

    • true m: TransformMatrix

    Returns Point

Methodtranslate

  • translate(p: Point): Point
  • Parameters

    • true p: Point

    Returns Point

staticMethodaverage

  • average(...points: SimplePoint[]): Point
  • Parameters

    • true true ...points: SimplePoint[]

    Returns Point

staticMethoddifference

  • difference(p1: SimplePoint, p2: SimplePoint): Point
  • Parameters

    • true p1: SimplePoint
    • true p2: SimplePoint

    Returns Point

staticMethoddistance

  • distance(p1: SimplePoint, p2: SimplePoint): number
  • Parameters

    • true p1: SimplePoint
    • true p2: SimplePoint

    Returns number

staticMethoddot

  • dot(p1: SimplePoint, p2: SimplePoint): number
  • Parameters

    • true p1: SimplePoint
    • true p2: SimplePoint

    Returns number

staticMethodfromPolar

  • fromPolar(angle: number, r?: number): Point
  • Parameters

    • true angle: number
    • true r: number = 1

    Returns Point

staticMethodinterpolate

  • interpolate(p1: SimplePoint, p2: SimplePoint, t?: number): Point
  • Parameters

    • true p1: SimplePoint
    • true p2: SimplePoint
    • true t: number = 0.5

    Returns Point

staticMethodinterpolateList

  • interpolateList(points: SimplePoint[], t?: number): Point
  • Parameters

    • true points: SimplePoint[]
    • true t: number = 0.5

    Returns Point

staticMethodmanhattan

  • manhattan(p1: SimplePoint, p2: SimplePoint): number
  • Parameters

    • true p1: SimplePoint
    • true p2: SimplePoint

    Returns number

staticMethodsum

  • sum(p1: SimplePoint, p2: SimplePoint): Point
  • Parameters

    • true p1: SimplePoint
    • true p2: SimplePoint

    Returns Point


VariableORIGIN

Polygon


ClassPolygon

A polygon defined by its vertex points.

constructor

  • new Polygon(...points: Point[]): Polygon
  • Parameters

    • true true ...points: Point[]

    Returns Polygon

Propertypoints

Propertytype

Accessorarea

  • get area()

Accessorcentroid

  • get centroid()

Accessorcircumference

  • get circumference()

Accessoredges

  • get edges()

Accessororiented

The oriented version of this polygon (vertices in clockwise order).

  • get oriented()

Accessorradius

  • get radius()

AccessorsignedArea

The (signed) area of this polygon. The result is positive if the vertices are ordered clockwise, and negative otherwise.

  • get signedArea()

Methodat

  • at(t: number): Point
  • Parameters

    • true t: number

    Returns Point

Methodcontains

  • contains(p: Point): boolean
  • Parameters

    • true p: Point

    Returns boolean

Methodequals

  • equals(_other: Polygon): boolean
  • Parameters

    • true _other: Polygon

    Returns boolean

Methodintersect

  • intersect(polygon: Polygon): undefined | Polygon
  • Parameters

    • true polygon: Polygon

    Returns undefined | Polygon

Methodproject

  • project(p: Point): Point
  • Parameters

    • true p: Point

    Returns Point

Methodreflect

  • reflect(line: Line): this
  • Parameters

    • true line: Line

    Returns this

Methodrotate

  • rotate(a: number, center?: Point): this
  • Parameters

    • true a: number
    • true center: Point = ORIGIN

    Returns this

Methodscale

  • scale(sx: number, sy?: number): this
  • Parameters

    • true sx: number
    • true sy: number = sx

    Returns this

Methodshift

  • shift(x: number, y?: number): this
  • Parameters

    • true x: number
    • true y: number = x

    Returns this

Methodtransform

  • transform(m: TransformMatrix): this
  • Parameters

    • true m: TransformMatrix

    Returns this

Methodtranslate

  • translate(p: Point): this
  • Parameters

    • true p: Point

    Returns this

staticMethodcollision

  • collision(p1: Polygon, p2: Polygon): boolean
  • Parameters

    • true p1: Polygon
    • true p2: Polygon

    Returns boolean

staticMethodinterpolate

  • interpolate(p1: Polygon, p2: Polygon, t?: number): Polygon
  • Parameters

    • true p1: Polygon
    • true p2: Polygon
    • true t: number = 0.5

    Returns Polygon

staticMethodregular

  • regular(n: number, radius?: number): Polygon
  • Parameters

    • true n: number
    • true radius: number = 1

    Returns Polygon


ClassPolyline

A polyline defined by its vertex points.

Propertytype

Accessoredges

  • get edges()

Accessorlength

  • get length()

ClassTriangle

A triangle defined by its three vertices.

Propertytype

Accessorcircumcircle

  • get circumcircle()

Accessorincircle

  • get incircle()

Accessororthocenter

  • get orthocenter()

Rectangle


ClassRectangle

A rectangle, defined by its top left vertex, width and height.

constructor

  • new Rectangle(p: Point, w?: number, h?: number): Rectangle
  • Parameters

    • true p: Point
    • true w: number = 1
    • true h: number = w

    Returns Rectangle

Propertyh

Propertyp

Propertytype

Propertyw

Accessorarea

  • get area()

Accessorcenter

  • get center()

Accessorcentroid

  • get centroid()

Accessorcircumference

  • get circumference()

Accessoredges

  • get edges()

Accessorpoints

  • get points()

Accessorpolygon

A polygon class representing this rectangle.

  • get polygon()

Methodat

  • at(_t: number): Point
  • Parameters

    • true _t: number

    Returns Point

Methodcontains

  • contains(p: Point): boolean
  • Parameters

    • true p: Point

    Returns boolean

Methodequals

  • equals(_other: Polygon): boolean
  • Parameters

    • true _other: Polygon

    Returns boolean

Methodproject

  • project(p: SimplePoint): Point
  • Parameters

    • true p: SimplePoint

    Returns Point

Methodreflect

  • reflect(l: Line): Polygon
  • Parameters

    • true l: Line

    Returns Polygon

Methodrotate

  • rotate(a: number, c?: Point): Polygon
  • Parameters

    • true a: number
    • true c: Point = ORIGIN

    Returns Polygon

Methodscale

  • scale(sx: number, sy?: number): Rectangle
  • Parameters

    • true sx: number
    • true sy: number = sx

    Returns Rectangle

Methodshift

  • shift(x: number, y?: number): Rectangle
  • Parameters

    • true x: number
    • true y: number = x

    Returns Rectangle

Methodtransform

  • transform(m: TransformMatrix): Polygon
  • Parameters

    • true m: TransformMatrix

    Returns Polygon

Methodtranslate

  • translate(p: Point): Rectangle
  • Parameters

    • true p: Point

    Returns Rectangle

staticMethodaroundPoints

  • aroundPoints(...points: Point[]): Rectangle
  • Parameters

    • true true ...points: Point[]

    Returns Rectangle

Types


FunctionisAngle

  • isAngle(shape: GeoElement): shape is Angle
  • Parameters

    • true shape: GeoElement

    Returns shape is Angle


FunctionisArc

  • isArc(shape: GeoElement): shape is Arc
  • Parameters

    • true shape: GeoElement

    Returns shape is Arc


FunctionisCircle

  • isCircle(shape: GeoElement): shape is Circle
  • Parameters

    • true shape: GeoElement

    Returns shape is Circle


FunctionisLine

  • isLine(shape: GeoElement): shape is Line
  • Parameters

    • true shape: GeoElement

    Returns shape is Line


FunctionisLineLike

  • isLineLike(shape: GeoElement): shape is Line | Ray | Segment
  • Parameters

    • true shape: GeoElement

    Returns shape is Line | Ray | Segment


FunctionisPoint

  • isPoint(shape: GeoElement): shape is Point
  • Parameters

    • true shape: GeoElement

    Returns shape is Point


FunctionisPolygon

  • isPolygon(shape: GeoElement): shape is Polygon
  • Parameters

    • true shape: GeoElement

    Returns shape is Polygon


FunctionisPolygonLike

  • isPolygonLike(shape: GeoElement): shape is Polygon | Rectangle
  • Parameters

    • true shape: GeoElement

    Returns shape is Polygon | Rectangle


FunctionisPolyline

  • isPolyline(shape: GeoElement): shape is Polyline
  • Parameters

    • true shape: GeoElement

    Returns shape is Polyline


FunctionisRay

  • isRay(shape: GeoElement): shape is Ray
  • Parameters

    • true shape: GeoElement

    Returns shape is Ray


FunctionisRectangle

  • isRectangle(shape: GeoElement): shape is Rectangle
  • Parameters

    • true shape: GeoElement

    Returns shape is Rectangle


FunctionisSector

  • isSector(shape: GeoElement): shape is Sector
  • Parameters

    • true shape: GeoElement

    Returns shape is Sector


FunctionisSegment

  • isSegment(shape: GeoElement): shape is Segment
  • Parameters

    • true shape: GeoElement

    Returns shape is Segment

Utilities


InterfaceGeoElement

Propertytype

Methodequals

  • equals(other: GeoElement, oriented?: undefined | false | true): boolean
  • Parameters

    • true other: GeoElement
    • true true oriented: undefined | false | true

    Returns boolean

Methodreflect

  • reflect(l: Line): GeoElement
  • Parameters

    • true l: Line

    Returns GeoElement

Methodrotate

  • rotate(angle: number, center?: SimplePoint): GeoElement
  • Parameters

    • true angle: number
    • true true center: SimplePoint

    Returns GeoElement

Methodscale

  • scale(sx: number, sy?: undefined | number): GeoElement
  • Parameters

    • true sx: number
    • true true sy: undefined | number

    Returns GeoElement

Methodshift

  • shift(x: number, y?: undefined | number): GeoElement
  • Parameters

    • true x: number
    • true true y: undefined | number

    Returns GeoElement

Methodtransform

  • transform(matrix: TransformMatrix): GeoElement
  • Parameters

    • true matrix: TransformMatrix

    Returns GeoElement

Methodtranslate

  • translate(p: Point): GeoElement
  • Parameters

    • true p: Point

    Returns GeoElement


InterfaceGeoShape

Methodat

  • at(t: number): Point
  • Parameters

    • true t: number

    Returns Point

Methodcontains

  • contains(p: Point): boolean
  • Parameters

    • true p: Point

    Returns boolean

Methodproject

  • project(p: Point): Point
  • Parameters

    • true p: Point

    Returns Point


Type aliasSimplePoint


Type aliasTransformMatrix


VariableTWO_PI


Functionrad

  • rad(p: SimplePoint, c?: SimplePoint): number
  • Parameters

    • true p: SimplePoint
    • true true c: SimplePoint

    Returns number