maps/invert#

Interfaces#

InversionContext#

Defined in: maps/invert.ts:28

What a map is inverted with: the compile context and the span of positions it is read over.

Extends#

Properties#

knots?#

readonly optional knots?: readonly MeasureKnots[]

Defined in: maps/compile.ts:34

Inherited from#

CompileContext.knots

span#

readonly span: object

Defined in: maps/invert.ts:30

The first and last position of the span; end is null where the line’s length is unknown.

end#

readonly end: Real | null

start#

readonly start: Real

Functions#

invert()#

invert(map, value, context): Real | null

Defined in: maps/invert.ts:378

The position at which map gives value, read over the context’s span: exact (a Rational) when the value and every parameter the inverse reads are exact, else a float; null when the map is not invertible there or no position of the intervals it reaches gives the value. The position may lie outside the span (a LinearMap reaches every value); whether it is allowed is the caller’s to say.

Parameters#

map#

{ } | { } | { } | { } | { } | { } | { } | { } | { } | { }

value#

CoordinateValue

context#

InversionContext

Returns#

Real | null


invertible()#

invertible(map, context): boolean

Defined in: maps/invert.ts:366

Whether map is strictly monotone, so invertible, over the context’s span.

Parameters#

map#

{ } | { } | { } | { } | { } | { } | { } | { } | { } | { }

context#

InversionContext

Returns#

boolean