class BinPacking::Heuristics::BottomLeft

Private Instance Methods

calculate_score(free_rect, rect_width, rect_height) click to toggle source
# File lib/bin_packing/heuristics/bottom_left.rb, line 6
def calculate_score(free_rect, rect_width, rect_height)
  top_side_y = free_rect.y + rect_height
  BinPacking::Score.new(top_side_y, free_rect.x)
end