numbers#

Variables#

GRID_FREE#

const GRID_FREE: number

Defined in: arranger/src/numbers.ts:5

The step of a canvas number when the grid does not snap: 1/2048 unit, the font’s units per em, so text-derived edges at scale 1 are stored exactly.


MIN_LENGTH#

const MIN_LENGTH: 8 = 8

Defined in: arranger/src/numbers.ts:9

The smallest graphical length a resize gives a block’s root.


MIN_SCALE#

const MIN_SCALE: number

Defined in: arranger/src/numbers.ts:7

The smallest scale a resize gives a block.

Functions#

positionStep()#

positionStep(grid): number

Defined in: arranger/src/numbers.ts:20

The step of positions under a grid: its size when it snaps, otherwise GRID_FREE.

Parameters#

grid#
size#

number

snap#

boolean

Returns#

number


quantize()#

quantize(value, step): number

Defined in: arranger/src/numbers.ts:15

value rounded to the nearest multiple of step, halves towards +∞ and never −0, so a stored canvas number carries no binary noise.

Parameters#

value#

number

step#

number

Returns#

number


sameSequence()#

sameSequence(left, right): boolean

Defined in: arranger/src/numbers.ts:25

Whether two sequences hold the same entries in the same order.

Parameters#

left#

readonly string[]

Returns#

boolean