Skip to content

Commit

Permalink
Documentation updates and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
griffithben committed Sep 8, 2023
1 parent 42c21a2 commit 67c0c40
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ Beer::maltColorUnit(Weight $weight, Color $color, Volume $volume): float
International Bitterness Units (IBU) is the bitterness of the beer based on the alpha acid of the
hops, weight of the hops, time in the boil, gravity of the wort, and volume of the wort.

Based off Palmer's Calculation

```php
Beer::internationalBitternessUnits(float $alphaAcid, Weight $weight, Time $time, Gravity $gravity, Volume $volume)
```
Expand Down Expand Up @@ -301,7 +303,7 @@ Beer::hopUtilization(Time $time, Gravity $gravity)

#### Calories

Determines th number of calories in a beer based on the original gravity, final gravity and the volume of the
Determines the number of calories in a finished beer based on the original gravity, final gravity and the volume of the
beer consumed.

```php
Expand Down
24 changes: 20 additions & 4 deletions src/Calculate/Beer.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public static function standardReferenceMethod(Weight $weight, Color $color, Vol
}

/**
* Malt Color Unit (MCU)
*
* Malt Color Unit (MCU) is an equation that helps determine what color a beer would be.
*
* @param \Unitz\Weight $weight
Expand All @@ -54,7 +56,11 @@ public static function maltColorUnit(Weight $weight, Color $color, Volume $volum
}

/**
* IBU
* International Bitterness Units (IBU)
*
* International Bitterness Units (IBU) is the bitterness of the beer based on the alpha acid of the
* hops, weight of the hops, time in the boil, gravity of the wort, and volume of the wort.
*
* Based off Palmer's Calculation
*
* @param float $alphaAcid
Expand Down Expand Up @@ -82,7 +88,9 @@ public static function internationalBitternessUnits(
}

/**
* AAU
* Alpha Acid Units (AAU)
*
* Alpha Acid Units (AAU) is the potential bitterness of the hops based on the alpha acid and weight.
*
* @param float $alphaAcid
* @param \Unitz\Weight $weight
Expand All @@ -94,6 +102,11 @@ public static function alphaAcidUnit(float $alphaAcid, Weight $weight): float
}

/**
* Hop Utilization
*
* This is a hop utilization factor based on the Tinseth formula derived
* by [Glenn Tinseth](https://beersmith.com/blog/2011/02/10/beer-bitterness-and-ibus-with-glenn-tinseth-bshb-podcast-9/]).
*
* @param \Unitz\Time $time
* @param \Unitz\Gravity $gravity
* @return float
Expand All @@ -105,7 +118,10 @@ public static function hopUtilization(Time $time, Gravity $gravity): float
}

/**
* Calories per Volume.
* Calories
*
* Determines the number of calories in a finished beer based on the original gravity, final gravity and the volume of the
* beer consumed.
*
* @param \Unitz\Gravity $originalGravity
* @param \Unitz\Gravity $finalGravity
Expand Down Expand Up @@ -205,7 +221,7 @@ public static function apparentDegreeOfFermentation(Gravity $originalGravity, Gr
}

/**
* Gravity Correction based on Temperature of Sample and Hydrometer Calibration
* Gravity Correction based on the Sample Temperature, Sample Gravity and Hydrometer Calibration Temperature
* Source: https://www.brewersfriend.com/hydrometer-temp/
*
* @param \Unitz\Temperature $sampleTemperature
Expand Down

0 comments on commit 67c0c40

Please sign in to comment.