Skip to content

@allmaps/stdlib

Allmaps Standard Library

MIT

  • line ([Point, Point])

number.

  • arrayMatrix (Array<Array<T>>)

[number, number].

  • array (Array<T>)
  • isEqualObject (((t0: T, t1: T) => boolean) | undefined)

Array<T>.

  • bbox ([number, number, number, number])

[number, number].

  • bbox ([number, number, number, number])

number.

  • bbox ([number, number, number, number])

[Point, Point].

  • bbox ([number, number, number, number])

Array<Array<Point>>.

  • bbox ([number, number, number, number])

[Point, Point, Point, Point].

  • bbox ([number, number, number, number])

number.

  • bbox ([number, number, number, number])

[number, number].

  • bbox0 ([number, number, number, number])
  • bbox1 ([number, number, number, number])

number.

  • line ([Point, Point])

number.

  • point ([number, number])
  • min ([number, number])
  • max ([number, number])

[number, number].

  • point ([number, number])

[number, number].

  • point ([number, number])

[number, number].

  • value (number)
  • min (number)
  • max (number)

number.

  • bbox ([number, number, number, number])
  • dist0 (number)
  • dist1 (number)

[number, number, number, number].

  • bbox ([number, number, number, number])
  • ratio? (number | undefined)

[number, number, number, number].

  • string (string)

string.

  • multiPolygon (Array<Array<Array<Point>>>)

Array<Array<Array<Point>>>.

  • polygon (Array<Array<Point>>)

Array<Array<Point>>.

  • ring (Array<Point>)

Array<Point>.

  • bboxes ([number, number, number, number])

Bbox | undefined.

  • points (Geometry | GeojsonGeometry)
  • options? (Partial<BboxOptions> | undefined)

[number, number, number, number].

  • values (Array<number>)

[number, number].

  • lineString (Array<Point>)

Array<Point>.

  • multiLineString (Array<Array<Point>>)

Array<Array<Point>>.

  • multiPolygon (Array<Array<Array<Point>>>)

Array<Array<Array<Point>>>.

  • polygon (Array<Array<Point>>)

Array<Array<Point>>.

  • ring (Array<Point>)

Array<Point>.

contractGeojsonGeometriesToGeojsonMultiGeometry(geojsonGeometries)

Section titled “contractGeojsonGeometriesToGeojsonMultiGeometry(geojsonGeometries)”
  • geojsonGeometries (Array<GeojsonPoint | GeojsonLineString | GeojsonPolygon>)

GeojsonMultiPoint | GeojsonMultiLineString | GeojsonMultiPolygon.

contractGeojsonLineStringsToGeojsonMultiLineString(geojsonLineStrings)

Section titled “contractGeojsonLineStringsToGeojsonMultiLineString(geojsonLineStrings)”
  • geojsonLineStrings (Array<GeojsonLineString>)

{type: 'MultiLineString'; coordinates: number[][][]}.

contractGeojsonPointsToGeojsonMultiPoint(geojsonPoints)

Section titled “contractGeojsonPointsToGeojsonMultiPoint(geojsonPoints)”
  • geojsonPoints (Array<GeojsonPoint>)

{type: 'MultiPoint'; coordinates: number[][]}.

contractGeojsonPolygonsToGeojsonMultiPolygon(geojsonPolygons)

Section titled “contractGeojsonPolygonsToGeojsonMultiPolygon(geojsonPolygons)”
  • geojsonPolygons (Array<GeojsonPolygon>)

{type: 'MultiPolygon'; coordinates: number[][][][]}.

  • points (Array<Point>)

Ring | undefined.

  • degrees (number)

number.

  • from ([number, number])
  • to ([number, number])

number.

  • bbox0 ([number, number, number, number])
  • bbox1 ([number, number, number, number])

boolean.

  • set1 (Set<T> | null)
  • set2 (Set<T> | null)

boolean.

expandGeojsonMultiGeometryToGeojsonGeometries(geojsonMultiGeometry)

Section titled “expandGeojsonMultiGeometryToGeojsonGeometries(geojsonMultiGeometry)”
  • geojsonMultiGeometry (GeojsonMultiPoint | GeojsonMultiLineString | GeojsonMultiPolygon)

Array<GeojsonPoint> | Array<GeojsonLineString> | Array<GeojsonPolygon>.

expandGeojsonMultiLineStringToGeojsonLineStrings(geojsonMultiLineString)

Section titled “expandGeojsonMultiLineStringToGeojsonLineStrings(geojsonMultiLineString)”
  • geojsonMultiLineString ({type: 'MultiLineString'; coordinates: number[][][]})

Array<GeojsonLineString>.

expandGeojsonMultiPointToGeojsonPoints(geojsonMultiPoint)

Section titled “expandGeojsonMultiPointToGeojsonPoints(geojsonMultiPoint)”
  • geojsonMultiPoint ({type: 'MultiPoint'; coordinates: number[][]})

Array<GeojsonPoint>.

expandGeojsonMultiPolygonToGeojsonPolygons(geojsonMultiPolygon)

Section titled “expandGeojsonMultiPolygonToGeojsonPolygons(geojsonMultiPolygon)”
  • geojsonMultiPolygon ({type: 'MultiPolygon'; coordinates: number[][][][]})

Array<GeojsonPolygon>.

  • parsedIiif (Image | Manifest | Collection)

Promise<Array<unknown>>.

  • input (RequestInfo | URL)
  • init? (RequestInit | undefined)
  • fetchFn? (FetchFn | undefined)

Promise<ImageBitmap>.

  • imageUri (string)
  • init? (RequestInit | undefined)
  • fetchFn? (FetchFn | undefined)

Promise<unknown>.

  • input (RequestInfo | URL)
  • init? (RequestInit | undefined)
  • fetchFn? (FetchFn | undefined)

Promise<unknown>.

  • input (RequestInfo | URL)
  • init? (RequestInit | undefined)
  • fetchFn? (FetchFn | undefined)

Promise<Response>.

  • point ([number, number])

[number, number].

  • point ([number, number])

[number, number].

geojsonFeatureCollectionToGeojsonGeometries(geojsonFeatureCollection)

Section titled “geojsonFeatureCollectionToGeojsonGeometries(geojsonFeatureCollection)”
  • geojsonFeatureCollection ({type: 'FeatureCollection'; features: GeojsonFeature[]})

Array<GeojsonGeometry>.

geojsonFeatureToGeojsonGeometry(geojsonFeature)

Section titled “geojsonFeatureToGeojsonGeometry(geojsonFeature)”
  • geojsonFeature ({type: 'Feature'; properties: unknown; geometry: GeojsonGeometry})

| GeojsonPoint | GeojsonLineString | GeojsonPolygon | GeojsonMultiPoint | GeojsonMultiLineString | GeojsonMultiPolygon.

geojsonFeaturesToGeojsonFeatureCollection(geojsonFeatures)

Section titled “geojsonFeaturesToGeojsonFeatureCollection(geojsonFeatures)”
  • geojsonFeatures (GeojsonFeature | Array<GeojsonFeature>)

{type: 'FeatureCollection'; features: GeojsonFeature[]}.

geojsonGeometriesToGeojsonFeatureCollection(geojsonGeometries, properties)

Section titled “geojsonGeometriesToGeojsonFeatureCollection(geojsonGeometries, properties)”
  • geojsonGeometries (Array<GeojsonGeometry>)
  • properties? (Array<unknown> | undefined)

{type: 'FeatureCollection'; features: GeojsonFeature[]}.

geojsonGeometryToGeojsonFeature(geojsonGeometry, properties)

Section titled “geojsonGeometryToGeojsonFeature(geojsonGeometry, properties)”
  • geojsonGeometry ( | GeojsonPoint | GeojsonLineString | GeojsonPolygon | GeojsonMultiPoint | GeojsonMultiLineString | GeojsonMultiPolygon)
  • properties? (unknown)

{type: 'Feature'; properties: unknown; geometry: GeojsonGeometry}.

  • geojsonPoint ({type: 'Point'; coordinates: number[]})

[number, number].

geojsonGeometryToSvgGeometry(geojsonGeometry)

Section titled “geojsonGeometryToSvgGeometry(geojsonGeometry)”
  • geojsonGeometry ( | GeojsonPoint | GeojsonLineString | GeojsonPolygon | GeojsonMultiPoint | GeojsonMultiLineString | GeojsonMultiPolygon)

SvgCircle | SvgLine | SvgPolyLine | SvgPolygon | SvgRect.

geojsonLineStringToLineString(geojsonLineString)

Section titled “geojsonLineStringToLineString(geojsonLineString)”
  • geojsonLineString ({type: 'LineString'; coordinates: number[][]})

Array<Point>.

geojsonMultiLineStringToMultiLineString(geojsonMultiLineString)

Section titled “geojsonMultiLineStringToMultiLineString(geojsonMultiLineString)”
  • geojsonMultiLineString ({type: 'MultiLineString'; coordinates: number[][][]})

Array<Array<Point>>.

geojsonMultiPointToMultiPoint(geojsonMultiPoint)

Section titled “geojsonMultiPointToMultiPoint(geojsonMultiPoint)”
  • geojsonMultiPoint ({type: 'MultiPoint'; coordinates: number[][]})

Array<Point>.

geojsonMultiPolygonToMultiPolygon(geojsonMultiPolygon, close)

Section titled “geojsonMultiPolygonToMultiPolygon(geojsonMultiPolygon, close)”
  • geojsonMultiPolygon ({type: 'MultiPolygon'; coordinates: number[][][][]})
  • close (boolean | undefined)

Array<Array<Array<Point>>>.

  • geojsonPoint ({type: 'Point'; coordinates: number[]})

[number, number].

geojsonPolygonToPolygon(geojsonPolygon, close)

Section titled “geojsonPolygonToPolygon(geojsonPolygon, close)”
  • geojsonPolygon ({type: 'Polygon'; coordinates: number[][][]})
  • close (boolean | undefined)

Array<Array<Point>>.

geojsonPolygonToRing(geojsonPolygon, close)

Section titled “geojsonPolygonToRing(geojsonPolygon, close)”
  • geojsonPolygon ({type: 'Polygon'; coordinates: number[][][]})
  • close (boolean | undefined)

Array<Point>.

  • geometry (Geometry | GeojsonGeometry)

number.

  • point ([number, number])
  • options? (Partial<MultiGeometryOptions> | undefined)

{type: 'Point'; coordinates: number[]}.

  • point ([number, number])

{type: 'circle'; attributes?: SvgAttributes; coordinates: Point}.

  • colors (Array<Color>)
  • binSize (number | undefined)

{[bin: string]: ColorCount}.

  • imageData (ImageData)
  • resolution (number | undefined)

Array<Color>.

getFullResourceMask(imageWidth, imageHeight)

Section titled “getFullResourceMask(imageWidth, imageHeight)”
  • imageWidth (number)
  • imageHeight (number)

Array<Point>.

  • imageBitmap (ImageBitmap)
  • mask? (Array<Point> | undefined)

ImageData.

  • histogram ({[bin: string]: ColorCount})

{count: number; color: Color}.

getPropertyFromCacheOrComputation(cache, key, computation, checkUse, checkStore)

Section titled “getPropertyFromCacheOrComputation(cache, key, computation, checkUse, checkStore)”
  • cache (Map<K, T>)
  • key (K)
  • computation (() => T)
  • checkUse (((t: T) => boolean) | undefined)
  • checkStore (((t: T) => boolean) | undefined)

T.

getPropertyFromDoubleCacheOrComputation(cache, key0, key1, computation, checkUse, checkStore)

Section titled “getPropertyFromDoubleCacheOrComputation(cache, key0, key1, computation, checkUse, checkStore)”
  • cache (Map<K0, Map<K1, T>>)
  • key0 (K0)
  • key1 (K1)
  • computation (() => T)
  • checkUse (((t: T) => boolean) | undefined)
  • checkStore (((t: T) => boolean) | undefined)

T.

getPropertyFromQuadrupleCacheOrComputation(cache, key0, key1, key2, key3, computation, checkUse, checkStore)

Section titled “getPropertyFromQuadrupleCacheOrComputation(cache, key0, key1, key2, key3, computation, checkUse, checkStore)”
  • cache (Map<K0, Map<K1, Map<K2, Map<K3, T>>>>)
  • key0 (K0)
  • key1 (K1)
  • key2 (K2)
  • key3 (K3)
  • computation (() => T)
  • checkUse (((t: T) => boolean) | undefined)
  • checkStore (((t: T) => boolean) | undefined)

T.

getPropertyFromTripleCacheOrComputation(cache, key0, key1, key2, computation, checkUse, checkStore)

Section titled “getPropertyFromTripleCacheOrComputation(cache, key0, key1, key2, computation, checkUse, checkStore)”
  • cache (Map<K0, Map<K1, Map<K2, T>>>)
  • key0 (K0)
  • key1 (K1)
  • key2 (K2)
  • computation (() => T)
  • checkUse (((t: T) => boolean) | undefined)
  • checkStore (((t: T) => boolean) | undefined)

T.

  • arr (Array<T>)
  • key ((i: T) => K)

{[P in K]: Array<T>}.

Convert hex to fractional RGBA, and sets the transparency to 1

  • hex (string)
    • hex string, e.g. ‘#0033ffcc’

Fractional RGB, e ([number, number, number, number]).g. [0, 0.2, 1, 1]

Convert hex to fractional RGB

  • hex (string)
    • hex string, e.g. ‘#0033ff’

Fractional RGB, e ([number, number, number]).g. [0, 0.2, 1]

Convert hex to fractional RGBA

  • hex (string)
    • hex string, e.g. ‘#0033ffff’

Fractional RGB, e ([number, number, number, number]).g. [0, 0.2, 1, 1]

Convert HEX to RGB, and sets the transparency to 255

  • hex (string)
    • HEX string, e.g. ‘#0033ffcc’

RGB, e ([number, number, number, number]).g. [0, 51, 255, 255]

Convert HEX to RGB

  • hex (string)
    • HEX string, e.g. ‘#0033ff’

RGB, e ([number, number, number]).g. [0, 51, 255]

Convert HEX to RGB

  • hex (string)
    • HEX string, e.g. ‘#0033ffff’

RGB, e ([number, number, number, number]).g. [0, 51, 255, 255]

  • bbox0 ([number, number, number, number])
  • bbox1 ([number, number, number, number])

Bbox | undefined.

  • point ([number, number])

[number, number].

  • points (Array<Point>)

Array<Point>.

  • input (Array<Point>)

boolean.

isEqualArray(array0, array1, isEqualObject)

Section titled “isEqualArray(array0, array1, isEqualObject)”
  • array0 (Array<T>)
  • array1 (Array<T>)
  • isEqualObject (((t0: T, t1: T) => boolean) | undefined)

boolean.

  • point0 ([number, number])
  • point1 ([number, number])

boolean.

isEqualPointArray(pointArray0, pointArray1)

Section titled “isEqualPointArray(pointArray0, pointArray1)”
  • pointArray0 (Array<Point>)
  • pointArray1 (Array<Point>)

boolean.

isEqualPointArrayArray(pointArrayArray0, pointArrayArray1)

Section titled “isEqualPointArrayArray(pointArrayArray0, pointArrayArray1)”
  • pointArrayArray0 (Array<Array<Point>>)
  • pointArrayArray1 (Array<Array<Point>>)

boolean.

  • obj (unknown)

boolean.

  • input (unknown)

boolean.

  • obj (unknown)

boolean.

  • input (unknown)

boolean.

  • input (unknown)

boolean.

  • input (unknown)

boolean.

  • input (unknown)

boolean.

  • input (unknown)

boolean.

  • input (unknown)

boolean.

  • input (unknown)

boolean.

  • input (unknown)

boolean.

  • input (unknown)

boolean.

  • input (unknown)

boolean.

  • input (unknown)

boolean.

  • input (unknown)

boolean.

  • input (unknown)

boolean.

  • input (any)

boolean.

  • input (any)

boolean.

  • input (any)

boolean.

  • input (any)

boolean.

  • input (any)

boolean.

  • string (string)

boolean.

  • line ([Point, Point])

number.

  • lineString (Array<Point>)

{type: 'LineString'; coordinates: number[][]}.

  • lineString (Array<Point>)

Array<Line>.

linesIntersectionPoint(line0, line1, options)

Section titled “linesIntersectionPoint(line0, line1, options)”
  • line0 ([Point, Point])
  • line1 ([Point, Point])
  • options? (Partial<IntersectionOptions> | undefined)

Point | undefined.

  • map ({ type: "GeoreferencedMap"; resource: { type: "ImageService1" | "ImageService2" | "ImageService3" | "Canvas"; id: string; height?: number | undefined; width?: number | undefined; partOf?: ({ type: string; id: string; label?: Record<string, (string | number | boolean)[]> | undefined; } & { partOf?: ({ type: string; i...)

{type: 'polygon'; attributes?: SvgAttributes; coordinates: Ring}.

mergeGeojsonFeaturesCollections(geojsonFeatureCollections)

Section titled “mergeGeojsonFeaturesCollections(geojsonFeatureCollections)”
  • geojsonFeatureCollections (Array<GeojsonFeatureCollection>)

{type: 'FeatureCollection'; features: GeojsonFeature[]}.

mergeOptions(baseOptions, additionalPartialOptions)

Section titled “mergeOptions(baseOptions, additionalPartialOptions)”
  • baseOptions (T)
  • additionalPartialOptions (U[0])

T & U[number].

mergeOptionsUnlessUndefined(baseOptions, additionalOptions)

Section titled “mergeOptionsUnlessUndefined(baseOptions, additionalOptions)”
  • baseOptions (T)
  • additionalOptions (Partial<U> | undefined)

T & Partial<U>.

  • partialOptions (U[0])

{[P in keyof U[number]]?: U[number][P] | undefined}.

mergeTwoOptionsUnlessUndefined(baseOptions, additionalOption)

Section titled “mergeTwoOptionsUnlessUndefined(baseOptions, additionalOption)”
  • baseOptions (T)
  • additionalOption (Partial<U> | undefined)

T & Partial<U>.

  • points ([number, number])

[number, number].

mixLineStrings(lineString0, lineString1, t)

Section titled “mixLineStrings(lineString0, lineString1, t)”
  • lineString0 (Array<Point>)
  • lineString1 (Array<Point>)
  • t (number)

Array<Point>.

  • number0 (number)
  • number1 (number)
  • t (number)

number.

  • point0 ([number, number])
  • point1 ([number, number])
  • t (number)

[number, number].

multiLineStringToGeojsonMultiLineString(multiLineString)

Section titled “multiLineStringToGeojsonMultiLineString(multiLineString)”
  • multiLineString (Array<Array<Point>>)

{type: 'MultiLineString'; coordinates: number[][][]}.

  • multiPoint (Array<Point>)

{type: 'MultiPoint'; coordinates: number[][]}.

multiPolygonToGeojsonMultiPolygon(multiPolygon, close)

Section titled “multiPolygonToGeojsonMultiPolygon(multiPolygon, close)”
  • multiPolygon (Array<Array<Array<Point>>>)
  • close (boolean | undefined)

{type: 'MultiPolygon'; coordinates: number[][][][]}.

  • arrayMatrix (Array<Array<number>>)
  • factor (number)

Array<Array<number>>.

Create and fill a ArrayMatrix: an Arrays of Arrays, that can later be loaded as a ml-matrix Matrix

  • rows (number)
  • cols (number)
  • value (T | undefined)

Array<Array<T>>.

  • blocks (Array<Array<Array<Array<T>>>>)
  • emptyValue (T | undefined)

Array<Array<T>>.

objectDifference(newObject, baseObject, objectKeysPossiblyChanged)

Section titled “objectDifference(newObject, baseObject, objectKeysPossiblyChanged)”
  • newObject (object)
  • baseObject (object)
  • objectKeysPossiblyChanged? (Array<string> | undefined)

object.

  • object (T)
  • keys (Array<string>)

{[P in keyof T]?: T[P] | undefined}.

optionKeysByMapIdToUndefinedOptionsByMapId(optionKeysByMapId)

Section titled “optionKeysByMapIdToUndefinedOptionsByMapId(optionKeysByMapId)”
  • optionKeysByMapId (Map<string, T> | undefined)

Map<string, Record<T[number], undefined>> | undefined.

  • optionKeys (T | undefined)

Record<T[number], undefined> | undefined.

pasteArrayMatrix(arrayMatrix, rowsStart, colsStart, subArrayMatrix)

Section titled “pasteArrayMatrix(arrayMatrix, rowsStart, colsStart, subArrayMatrix)”
  • arrayMatrix (Array<Array<T>>)
  • rowsStart (number)
  • colsStart (number)
  • subArrayMatrix (Array<Array<T>>)

Array<Array<T>>.

pixelToIntArrayIndex(pixel, size, channels, flipY)

Section titled “pixelToIntArrayIndex(pixel, size, channels, flipY)”
  • pixel ([number, number])
  • size ([number, number])
  • channels (number)
  • flipY (boolean | undefined)

number.

  • point ([number, number])
  • bbox ([number, number, number, number])

boolean.

  • point ([number, number])

{type: 'Point'; coordinates: number[]}.

  • point ([number, number])
  • translate (Point | undefined)

[number, number].

  • points0 (Array<Point>)
  • points1 (Array<Point>)

Array<Line>.

polygonSelfIntersectionPoints(polygon, options)

Section titled “polygonSelfIntersectionPoints(polygon, options)”
  • polygon (Array<Array<Point>>)
  • options? (Partial<IntersectionOptions> | undefined)

Array<Point>.

  • polygon (Array<Array<Point>>)
  • close (boolean | undefined)

{type: 'Polygon'; coordinates: number[][][]}.

prolongedLinesIntersectionPoint(line0, line1)

Section titled “prolongedLinesIntersectionPoint(line0, line1)”
  • line0 ([Point, Point])
  • line1 ([Point, Point])

Point | undefined.

  • radians (number)

number.

  • rectangle ([Point, Point, Point, Point])

[number, number].

  • rectangle0 ([Point, Point, Point, Point])
  • rectangle1 ([Point, Point, Point, Point])

number.

Convert RBG to HEX

  • color ([number, number, number])

HEX string, e (string).g. ‘#0033ff’

Convert RBGA to HEX

  • color ([number, number, number, number])

HEX string, e (string).g. ‘#0033ffff’

  • ring (Array<Point>)
  • close (boolean | undefined)

{type: 'Polygon'; coordinates: number[][][]}.

  • from (Array<Point>)
  • to (Array<Point>)

number.

rotatePoint(point, angle, anchor, cosAngle, sinAngle)

Section titled “rotatePoint(point, angle, anchor, cosAngle, sinAngle)”
  • point ([number, number])
  • angle (number | undefined)
  • anchor (Point | undefined)
  • cosAngle? (number | undefined)
  • sinAngle? (number | undefined)

[number, number].

rotatePoints(points, angle, anchor, cosAngle, sinAngle)

Section titled “rotatePoints(points, angle, anchor, cosAngle, sinAngle)”
  • points (Array<Point>)
  • angle (number | undefined)
  • anchor (Point | undefined)
  • cosAngle? (number | undefined)
  • sinAngle? (number | undefined)

Array<Point>.

  • point ([number, number])
  • scale (number)

[number, number].

  • points (Array<Point>)
  • scale (number)

Array<Point>.

  • size ([number, number])
  • scale (number)

[number, number].

  • arrayMatrix (Array<Array<T>>)

Array<Array<T>>.

  • size ([number, number])

[number, number, number, number].

  • size ([number, number])

[number, number].

  • size ([number, number])

[Point, Point, Point, Point].

  • size ([number, number])

number.

Compute a size from two scales

For unspecified ‘fit’, the scale is computed based on the surface area derived from the sizes.

For specified ‘fit’:

Example for square rectangles ’*’ and ’+’:

‘contain’ where ’*’ contains ’.’ (in the first image size0 is relatively wider)

****
* *

  • . . * . . … * * ****

‘cover’ where ’*’ is covered by ’.’ (in the first image size0 is relatively wider)

....
. .

.... **** . * * . * * .... **** …

  • size0 ([number, number])
    • first size
  • size1 ([number, number])
    • second size
  • fit? (Fit | undefined)
    • fit

number.

sliceArrayMatrix(arrayMatrix, rowsStart, colsStart, rowsEnd, colsEnd)

Section titled “sliceArrayMatrix(arrayMatrix, rowsStart, colsStart, rowsEnd, colsEnd)”
  • arrayMatrix (Array<Array<T>>)
  • rowsStart (number)
  • colsStart (number)
  • rowsEnd? (number | undefined)
  • colsEnd? (number | undefined)

Array<Array<T>>.

  • from ([number, number])
  • to (Point | undefined)

number.

  • point ([number, number])
  • dist (number)
  • angle (number)

[number, number].

  • svg (string)

Generator<SvgGeometry, void, unknown>.

  • arrayMatrix (Array<Array<T>>)
  • rows (Array<number>)
  • cols (Array<number>)

Array<Array<T>>.

  • arr1 (Array<T>)
  • arr2 (Array<T>)

boolean.

  • geometries (Array<SvgGeometry>)

string.

  • svgCircle ({type: 'circle'; attributes?: SvgAttributes; coordinates: Point})

[number, number].

  • geometry (SvgCircle | SvgLine | SvgPolyLine | SvgPolygon | SvgRect)

string.

threePointsToAngle(pointA, pointB, pointC)

Section titled “threePointsToAngle(pointA, pointB, pointC)”

Return angle alpha made at point A by points B and C

  • pointA ([number, number])
  • pointB ([number, number])
  • pointC ([number, number])

number.

translatePoint(point, translationPoint, addOrSubstract)

Section titled “translatePoint(point, translationPoint, addOrSubstract)”
  • point ([number, number])
  • translationPoint ([number, number])
  • addOrSubstract ('add' | 'substract' | undefined)

[number, number].

translatePoints(points, point, addOrSubstract)

Section titled “translatePoints(points, point, addOrSubstract)”
  • points (Array<Point>)
  • point ([number, number])
  • addOrSubstract ('add' | 'substract' | undefined)

Array<Point>.

  • arrayMatrix (Array<Array<T>>)

Array<Array<T>>.

  • triangle ([Point, Point, Point])

[number, number, number].

  • triangle ([Point, Point, Point])

number.

  • multiPolygon (Array<Array<Array<Point>>>)

Array<Array<Array<Point>>>.

  • polygon (Array<Array<Point>>)

Array<Array<Point>>.

  • ring (Array<Point>)

Array<Point>.