number/display#
Interfaces#
CoordinateDict#
Defined in: number/display.ts:70
A coordinate dict: a value on an axis, its value written as the number type selects.
Properties#
number_type#
readonlynumber_type:NumberType
Defined in: number/display.ts:72
unit#
readonlyunit:TimeUnit
Defined in: number/display.ts:71
value#
readonlyvalue:JsonNumber| readonly [JsonNumber,JsonNumber]
Defined in: number/display.ts:73
Functions#
coordinateDict()#
coordinateDict(
value,unit,numberType):CoordinateDict
Defined in: number/display.ts:304
The coordinate dict {unit, number_type, value} of a value, the value
written as a bare value of its number type (a Fraction as its pair).
Parameters#
value#
unit#
TimeUnit
numberType#
NumberType
Returns#
Throws#
as copyValue.
copyValue()#
copyValue(
value,numberType):string
Defined in: number/display.ts:263
The text Copy puts on the clipboard: the whole value, a fraction n/d
(n when the denominator is 1), a float as spelled, an int its digits.
Parameters#
value#
numberType#
NumberType
Returns#
string
Throws#
if the value is not of the number type’s kind (a bigint for int, a number for float, a Rational for fraction).
prettyText()#
prettyText(
value,numberType,unit,decimals?):string
Defined in: number/display.ts:287
The pretty text of a coordinate: its pretty number, a space and its
pretty unit (13 11/16 ♩, 514 041 smp), seconds split as 1′15.5″, a
value without a unit (null) its number alone. Exact without decimals;
with decimals, rounded as the module states.
Parameters#
value#
numberType#
NumberType
unit#
TimeUnit | null
decimals?#
number
Returns#
string
Throws#
as copyValue.
prettyUnit()#
prettyUnit(
unit):string
Defined in: number/display.ts:253
The pretty unit of unit: ♩ for quarters, 𝅝 for whole notes, ms,
s, min, smp, ticks, px, pt, m, cm, mm, in, uu for user
units, any other unit its name.
Parameters#
unit#
TimeUnit
Returns#
string
rawText()#
rawText(
value,numberType,unit):string
Defined in: number/display.ts:275
The raw text of a coordinate: copyValue, a space and the unit’s schema
name (219/16 quarters, 0.1 seconds, 514041 samples).
Parameters#
value#
numberType#
NumberType
unit#
TimeUnit
Returns#
string
Throws#
as copyValue.