diff options
author | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-29 21:51:57 -0700 |
---|---|---|
committer | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-29 23:01:10 -0700 |
commit | e048ef1f5268c90ea3a4a0604083c253b20fdd6b (patch) | |
tree | 97c67ad5898ee7c3bc71e53c86efab7f126440ec /crawl-ref/source/stepdown.h | |
parent | 9cedde55d9b5b82ba9c22a49ffa425ad4d7b369b (diff) | |
download | crawl-ref-e048ef1f5268c90ea3a4a0604083c253b20fdd6b.tar.gz crawl-ref-e048ef1f5268c90ea3a4a0604083c253b20fdd6b.zip |
Remove stuff
.cc, moving its contents into the new stepdown.cc and strings.cc.
(The latter also got many donations from libutil.h.)
Down with stuff! Up the new flesh!
Diffstat (limited to 'crawl-ref/source/stepdown.h')
-rw-r--r-- | crawl-ref/source/stepdown.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crawl-ref/source/stepdown.h b/crawl-ref/source/stepdown.h new file mode 100644 index 0000000000..864fb4b3df --- /dev/null +++ b/crawl-ref/source/stepdown.h @@ -0,0 +1,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 |