Skip to content

Function: toNorm()

toNorm(sample, surface): WirePoint

Defined in: protocol.ts:288

Canvas sample → wire point. The inverse of fromNorm on position; the instrument's other channels ride along untouched.

A degenerate surface (zero width or height — a canvas that has not been laid out yet) maps to 0 rather than NaN: a stroke drawn into a not-yet-sized canvas should land at the origin, not poison every downstream number.

Parameters

sample

PenSample

surface

Surface

Returns

WirePoint