# Installation

Use npm command in order to install bh-syren-raw-convertor:

```bash
npm install [--save] bh-syren-raw-convertor
```

# bh-syren-raw-convertor

The bh-syren-raw-convertor module allows to convert raw height measurment to a volume in a specific container model.

# Usage example:

## Simple container model

```js
const Assert = require('assert');
const BHSyrenRawConvertor = require('bh-syren-raw-convertor');

var model = [
  [0, 0],
  [1000, 1000]
];
var height = 100;

Assert.equal(100, BHSyrenRawConvertor.convert(model, height));
```

## Complex container model

```js
const Assert = require('assert');
const BHSyrenRawConvertor = require('bh-syren-raw-convertor');

var model = [
  [0, 0],
  [1000, 2000],
  [2000, 4000]
];
var height = 1500;

Assert.equal(3125, BHSyrenRawConvertor.convert(model, height));
```
