Sha256: 0e1ca9aac9c51908349e73847a1b6d197ae363190297d29208f3842c0ca19098
Contents?: true
Size: 377 Bytes
Versions: 7
Compression:
Stored size: 377 Bytes
Contents
# frozen_string_literal: true new({particle: :width }) new({particle: :height }) new({particle: :size }) do |params| atome_width = atome[:width] atome_height = atome[:height] aspect_ratio = atome_width / atome_height if atome_width > atome_height width(params) height(params / aspect_ratio) else width(params * aspect_ratio) height(params) end end
Version data entries
7 entries across 7 versions & 1 rubygems