A scale function that takes an input value to scale. Input can be in the form of { x, y } or two number parameters.
{ x, y }
scale(10, 20);scale({ x:10, y:20 }); Copy
scale(10, 20);scale({ x:10, y:20 });
Output range can be specified as a { width, height } or two number parameters. If omitted, the default range is used.
{ width, height }
// Scale 10,20 with range w:800 h:600scale(10, 20, 800, 600);scale({x:10, y:20}, 800, 600);scale({x:10, y:20}, {width: 800, height: 600}); Copy
// Scale 10,20 with range w:800 h:600scale(10, 20, 800, 600);scale({x:10, y:20}, 800, 600);scale({x:10, y:20}, {width: 800, height: 600});
A scale function that takes an input value to scale. Input can be in the form of
{ x, y }
or two number parameters.Output range can be specified as a
{ width, height }
or two number parameters. If omitted, the default range is used.