| Mozzi version v1.1.0 sound synthesis library for Arduino |

Public Member Functions | List of all members
IntMap Class Reference

A faster version of Arduino's map() function. More...

`#include <IntMap.h>`

## Public Member Functions
| IntMap (int in_min, int in_max, int out_min, int out_max)
| Constructor. More...
int | operator() (int n) const
| Process the next input value. More...

## Detailed Description

A faster version of Arduino's map() function.

This uses ints instead of longs internally and does some of the maths at compile time.

Definition at line 18 of file IntMap.h.

## Constructor & Destructor Documentation

## ◆ IntMap()

IntMap::IntMap | ( | int | in_min,
|  | int | in_max,
|  | int | out_min,
|  | int | out_max
| ) |  |
| inline

Constructor.

Parameters

  in_min | the minimum of the input range.
  in_max | the maximum of the input range.
  out_min | the minimum of the output range.
  out_max | the maximum of the output range.

Definition at line 27 of file IntMap.h.

## Member Function Documentation

## ◆ operator()()

int IntMap::operator() | ( | int | n | ) | const
| inline

Process the next input value.

Parameters

  n | the next integer to process.

Returns
  the input integer mapped to the output range.

Definition at line 38 of file IntMap.h.