Method: Geometry::VertexRing#insert
- Defined in:
- lib/geometry/polygon.rb
#insert(index, point, type) ⇒ Object
335 336 337 338 339 340 341 342 343 |
# File 'lib/geometry/polygon.rb', line 335 def insert(index, point, type) if v = @vertices.find {|v| v[:vertex] == point } v[:type] = type false else @vertices.insert(index, {:vertex => point, :type => type}) true end end |