10#ifndef __stir_STIR_MATH_H__
11#define __stir_STIR_MATH_H__
32 const float add_scalar,
const float mult_scalar,
const float power,
const float min_threshold,
const float max_threshold)
36 min_threshold(min_threshold),
37 max_threshold(max_threshold)
40 float operator()(
float const arg)
const
42 const float value = min(max(arg, min_threshold), max_threshold);
43 return add + mult * (power == 1 ? value : pow(value, power));
50 const float min_threshold;
51 const float max_threshold;