You can use this module's functions in your Sass files.
### Converting between size units
The two most-used functions provided by the functions module help convert between pixel (an absolute-size unit) and REM (a relative-size unit).
#### From pixel to REM
The `calculateRem` function takes a value in pixels and returns the equivalent in REM. You can use it like this:
```
.special-font-class {
font-size: calculateRem(16px);
}
```
The size returned will depend on the base rem size set in your project (you'll set your base rem when you import the `px-defaults-design` module.)
#### From REM to pixel
The `remTopx` function does the opposite: it takes a value in REM and returns the equivalent in pixels. You can use it like this:
```
.another-special-font-class {
font-size: remToPx(1.4rem);
}
```
Again, the size returned will depend on the base rem size set in your project.
## Additional functions
The functions module also provides a set of related utilities that take a number and compute a multiple or fraction of it. For example, you can use the following function to get the result of 3 * 4 and convert it to REM.
```
.big-font-class {
// Multiplying by 1rem is a simple way to add units after doing math
font-size: triple(3) * 1rem;
}
```
In addition to `triple`, you can use `quarter`, `halve`, `double`, `quadruple`, and `third`. All functions will return rounded integers.