Template Function librapid::map#

Function Documentation#

template<typename V, typename B1, typename E1, typename B2, typename E2>
auto librapid::map(const V &val, const B1 &start1, const E1 &stop1, const B2 &start2, const E2 &stop2)#

Map a value from one range to another

Template Parameters
  • V – Data type of the value to map

  • B1 – Data type of the lower bound of the input range

  • E1 – Data type of the upper bound of the input range

  • B2 – Data type of the lower bound of the output range

  • E2 – Data type of the upper bound of the output range

Parameters
  • val – Value to map

  • start1 – Lower bound of the input range

  • stop1 – Upper bound of the input range

  • start2 – Lower bound of the output range

  • stop2 – Upper bound of the output range

Returns

Mapped value