Class: AlcoholTable

AlcoholTable

Ethanol–water reference data table based on the "Laboratory Alcohol Table for Working Out Alcohol Strength" published by HM Revenue & Customs.

The dataset has been adapted, reformatted, corrected for known typographical errors, and numerically recalculated where needed.

Intermediate values are obtained by linear interpolation between the nearest data points.

Example: Searching for [1.7, X] in a table [[1, 10], [2, 20]] yields [1.7, 17]. Searching for [1.5, X] in a table [[1, 10], [2, 50]] yields [1.5, 30].

Methods

(static) lookup(value, col_lookup, col_result, inverse) → {number}

Search the table for a given value and get the corresponding value

Parameters:
Name Type Description
value number

Reference value

col_lookup number

Reference column

col_result number

Result column

inverse boolean

Whether to scan from the end of the table

Source:
Throws:
Error
Returns:
Type
number