Creates a scale. [[1, 'in'], [2, 'ft']], '1 in = 2 ft' and { pageScale, worldScale } are equivalent.
Scale as a ratio array, a 'value unit = value unit' string, or a pageScale / worldScale object.
Length on the page and its unit.
Corresponding real-world length and its unit.
Optionalprecision: number
Precision of measured values; 0.01 means two decimals.
StaticgetFormats by precision: decimal getFormattedValue(1.2345, 'ft', 0.01) → '1.23 ft'; inches and feet-inches use fractions when the precision is 1/8, 1/16, 1/32 or 1/64: (2.0833, 'in', 0.125) → '2 ⅛"', (2.0833, 'ft-in', 0.125) → '2'-1"'; feet-inches with decimals is '2ft-1.00in'. With useUnicodeFraction false, fractions are written as 1/8 (standard fonts cannot draw characters such as ⅛); with showZero true, zero inches are written too ('2 0', '2ft-0.00in').
Optionalprecision: numberOptionaluseUnicodeFraction: booleanOptionalshowZero: booleanReturns the scale as a ratio array.
[[pageValue, pageUnit], [worldValue, worldUnit]].
Both sides have a positive value and a unit.
Returns the scale as text.
A string such as '1 in = 2 ft'.
Length on the page and its unit. Value 0 and an empty unit when the input could not be parsed.
OptionalprecisionPrecision of measured values; 0.01 means two decimals.
Real-world length and its unit. Value 0 and an empty unit when the input could not be parsed.
Measurement scale:
pageScaleon the page corresponds toworldScalein the real world.