Skip to main content

Function: computeThetaBetweenVertices()

computeThetaBetweenVertices(vtx1, vtx2): number

Defined in: simulation/simulation.ts:1781

computes the angle between two vertices.

Parameters​

vtx1​

YarnVertex

(the last observed vertex - always computes left to right, so this is the leftmost vertex)

vtx2​

YarnVertex

(the current vertex - always computes left to right, so this is the rightmost vertex)

Returns​

number

the theta between the two verticies. -theta means the last vertex is highter (has a higheter y value than the current). +theta means the opposite