class PSD
  class Util
    # Ensures value is a multiple of 2
    def self.pad2(i)
      ((i + 1) / 2) * 2
    end

    # Ensures value is a multiple of 4
    def self.pad4(i)
      i - (i.modulo(4)) + 3
    end

    def self.clamp(num, min, max)
      [min, num, max].sort[1]
    end
  end
end
class PSD
  module Util
    extend self

    # Ensures value is a multiple of 2
    def pad2(i)
      ((i + 1) / 2) * 2
    end

    # Ensures value is a multiple of 4
    def pad4(i)
      i - (i.modulo(4)) + 3
    end

    def clamp(num, min, max)
      [min, num, max].sort[1]
    end
  end
end
Change Util to a module
Change Util to a module
