Capitalise a macro

This commit is contained in:
Clownacy 2020-01-04 20:57:36 +00:00
parent cd589b7c1d
commit bbf77f9cfd

View file

@ -12,7 +12,7 @@
#define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b))
#define clamp(x, y, z) MIN(MAX((x), (y)), (z)) #define CLAMP(x, y, z) MIN(MAX((x), (y)), (z))
struct AudioBackend_Sound struct AudioBackend_Sound
{ {
@ -40,7 +40,7 @@ static unsigned long output_frequency;
static double MillibelToScale(long volume) static double MillibelToScale(long volume)
{ {
// Volume is in hundredths of decibels, from 0 to -10000 // Volume is in hundredths of decibels, from 0 to -10000
volume = clamp(volume, -10000, 0); volume = CLAMP(volume, -10000, 0);
return pow(10.0, volume / 2000.0); return pow(10.0, volume / 2000.0);
} }