UNPKG

gl2d

Version:

2D graphics package for WebGL

10 lines (9 loc) 786 B
import { Vec2, Vec2Like } from '../struct/vec2'; /** * Measures the miter vector needed to join the two specified lines. Assumes the lines are measured from points listed in CCW order. * @param line1 The nonzero vector from the start of the first line to the end of the first line. Will not be modified. * @param line2 The nonzero vector from the start of the second line to the end of the second line. Will not be modified. * @param lineWidth The width of the second line (or half the width, if joining at the center of the lines). * @param miterLimit The maximum allowable miter length before a bevel is applied. Usually some multiple of lineWidth. */ export declare function measureMiter(line1: Vec2Like, line2: Vec2Like, lineWidth: number, miterLimit: number): Vec2;