@baku89/pave - v0.4.1 / Line
Namespace: Line
A collection of functions to handle a line represented with SegmentL.
Variables
curvature
• Const
curvature: 0
Defined in
Functions
bounds
▸ bounds(line
): Rect
Parameters
Name | Type |
---|---|
line | SimpleSegmentL |
Returns
Defined in
derivative
▸ derivative(line
): vec2
Parameters
Name | Type |
---|---|
line | SimpleSegmentL |
Returns
vec2
Defined in
divideAtTimes
▸ divideAtTimes(line
, times
): VertexL
[]
Parameters
Name | Type |
---|---|
line | SimpleSegmentL |
times | Iterable <number > |
Returns
VertexL
[]
Defined in
isZero
▸ isZero(line
): boolean
Returns true if the length of line segment is zero.
Parameters
Name | Type |
---|---|
line | SimpleSegmentL |
Returns
boolean
Defined in
normal
▸ normal(line
): vec2
Parameters
Name | Type |
---|---|
line | SimpleSegmentL |
Returns
vec2
Defined in
offset
▸ offset(line
, distance
): PathL
Parameters
Name | Type |
---|---|
line | SimpleSegmentL |
distance | number |
Returns
Defined in
orientation
▸ orientation(line
, loc
): mat2d
Parameters
Name | Type |
---|---|
line | SimpleSegmentL |
loc | SegmentLocation |
Returns
mat2d
Defined in
point
▸ point(line
, loc
): vec2
Parameters
Name | Type |
---|---|
line | SimpleSegmentL |
loc | SegmentLocation |
Returns
vec2
Defined in
tangent
▸ tangent(line
): vec2
Parameters
Name | Type |
---|---|
line | SimpleSegmentL |
Returns
vec2
Defined in
toTime
▸ toTime(line
, loc
): number
Converts a signed location to a time between 0 and 1.
Parameters
Name | Type |
---|---|
line | SimpleSegmentL |
loc | SegmentLocation |
Returns
number
Defined in
trim
▸ trim(line
, start
, end
): SegmentL
Parameters
Name | Type |
---|---|
line | SimpleSegmentL |
start | SegmentLocation |
end | SegmentLocation |