getEdge method

LineSegment getEdge(
  1. int i, {
  2. required List<Vector2> vertices,
})

Implementation

LineSegment getEdge(int i, {required List<Vector2> vertices}) {
  _lineSegments[i].from.setFrom(getVertex(i, vertices: vertices));
  _lineSegments[i].to.setFrom(getVertex(i + 1, vertices: vertices));
  return _lineSegments[i];
}