Method: Geometry::Polyline#bisectors
- Defined in:
- lib/geometry/polyline.rb
#bisectors ⇒ Array<Vector>
Note:
If the Geometry::Polyline isn’t closed (the normal case), then the first and last vertices will be given bisectors that are perpendicular to themselves.
Generate the angle bisector unit vectors for each vertex
187 188 189 190 |
# File 'lib/geometry/polyline.rb', line 187 def bisectors # Multiplying each bisector by the sign of k flips any bisectors that aren't pointing towards the interior of the angle bisector_map {|b, k| k <=> 0 } end |