Class: Beeruby::Bitterness

Inherits:
Object
  • Object
show all
Defined in:
lib/beeruby/bitterness.rb

Class Method Summary collapse

Class Method Details

.tinseth(alpha, hop_weight, wort_gravity, boil_time, post_boil_volume) ⇒ Object



3
4
5
6
7
8
# File 'lib/beeruby/bitterness.rb', line 3

def self.tinseth(alpha, hop_weight, wort_gravity, boil_time, post_boil_volume)
    ((
        ((75.to_f * ((alpha.to_f * hop_weight.to_f) * 1.65 * (0.000125 ** (wort_gravity.to_f - 1.to_f))))) *
        (1.to_f - (Math::E ** (-0.04 * boil_time.to_f))) / 4.15
    ) / post_boil_volume).round(1)
end