blob: 864fb4b3dffa342e9aa702f3655836c8740e3ea1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/**
* @file
* @brief Stepdown functions.
**/
#ifndef STEPDOWN_H
#define STEPDOWN_H
// stepdowns
enum rounding_type
{
ROUND_DOWN,
ROUND_CLOSE,
ROUND_RANDOM
};
double stepdown(double value, double step);
int stepdown(int value, int step, rounding_type = ROUND_CLOSE, int max = 0);
int stepdown_value(int base_value, int stepping, int first_step,
int last_step, int ceiling_value);
#endif
|