Sha256: 2e2feb16d84997108c32f4232bc63af81be6e0e1c344abadfa6644b748a4f07b
Contents?: true
Size: 522 Bytes
Versions: 9
Compression:
Stored size: 522 Bytes
Contents
# -*- coding: utf-8 -*- require 'rays/ext' module Rays class Polyline include Enumerable def initialize (*points, loop: false) setup points, loop end def transform (matrix = nil, loop: loop?, &block) points = to_a points = points.map {|point| matrix * point} if matrix points = block.call points if block self.class.new *points, loop: loop end def inspect () "#<Rays::Polyline #{to_a.join ', '}, loop: #{loop?}>" end end# Polyline end# Rays
Version data entries
9 entries across 9 versions & 1 rubygems