mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- promote fclamp()
and fclamp2()
to double.
This commit is contained in:
parent
7b8e40c7e1
commit
4301706e00
1 changed files with 2 additions and 2 deletions
|
@ -843,10 +843,10 @@ using std::max;
|
|||
#else
|
||||
// Clamp <in> to [<min>..<max>]. The case in <= min is handled first.
|
||||
ABSTRACT_DECL int32_t clamp(int32_t in, int32_t min, int32_t max) { return in <= min ? min : (in >= max ? max : in); }
|
||||
ABSTRACT_DECL float fclamp(float in, float min, float max) { return in <= min ? min : (in >= max ? max : in); }
|
||||
ABSTRACT_DECL double fclamp(double in, double min, double max) { return in <= min ? min : (in >= max ? max : in); }
|
||||
// Clamp <in> to [<min>..<max>]. The case in >= max is handled first.
|
||||
ABSTRACT_DECL int32_t clamp2(int32_t in, int32_t min, int32_t max) { return in >= max ? max : (in <= min ? min : in); }
|
||||
ABSTRACT_DECL float fclamp2(float in, float min, float max) { return in >= max ? max : (in <= min ? min : in); }
|
||||
ABSTRACT_DECL double fclamp2(double in, double min, double max) { return in >= max ? max : (in <= min ? min : in); }
|
||||
|
||||
#ifndef min
|
||||
# define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
|
Loading…
Reference in a new issue