lib/cotcube-level/helpers.rb
# the actual shearing takes place here. please not that shifting of :x takes place
#     by setting the new :x as :dx. so if :dx is found, it is used, otherwise :x
the actual shearing takes place here. please not that shifting of :x takes place
by setting the new :x as :dx. so if :dx is found, it is used, otherwise :x
the actual shearing takes place here . please not that shifting of : x takes place by setting the new : x as : dx . so if : dx is found it is used otherwise : x
def shear_to_rad(base: , rad:)
      tan = Math.tan(rad)
      base.map { |member|
        member[:yy] =
          member[:y] +
          (member[:dx].nil? ? member[:x] : member[:dx]) * tan
        member
      }
    end
def shear_to_rad ( base : , rad : ) tan = Math . tan ( rad ) base . map { | member | member [ :yy ] = member [ :y ] + ( member [ :dx ] . nil? ? member [ :x ] : member [ :dx ] ) * tan member } end
the actual shearing takes place here.
the actual shearing takes place here .
# separating lines for easier debugging
base
<not_specific>
rad
<not_specific>