Scales a line from its midpoint
import { Lines } from 'https://unpkg.com/ixfx/dist/geometry.js'const l = { a: {x:50, y:50}, b: {x: 100, y: 90}}const l2 = Lines.scaleFromMidpoint(l, 0.5); Copy
import { Lines } from 'https://unpkg.com/ixfx/dist/geometry.js'const l = { a: {x:50, y:50}, b: {x: 100, y: 90}}const l2 = Lines.scaleFromMidpoint(l, 0.5);
Scales a line from its midpoint
Example: Shorten by 50%, anchored at the midpoint