mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Add some internal functions for converting between radians and degrees.
These are in preparation for some spatialization functionality.
This commit is contained in:
+21
@@ -7046,6 +7046,27 @@ static MA_INLINE float ma_log10f(float x)
|
||||
}
|
||||
|
||||
|
||||
static MA_INLINE double ma_degrees_to_radians(double degrees)
|
||||
{
|
||||
return degrees * 0.01745329252;
|
||||
}
|
||||
|
||||
static MA_INLINE double ma_radians_to_degrees(double radians)
|
||||
{
|
||||
return radians * 57.295779512896;
|
||||
}
|
||||
|
||||
static MA_INLINE float ma_degrees_to_radians_f(float degrees)
|
||||
{
|
||||
return degrees * 0.01745329252f;
|
||||
}
|
||||
|
||||
static MA_INLINE float ma_radians_to_degrees_f(float radians)
|
||||
{
|
||||
return radians * 57.295779512896f;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Return Values:
|
||||
0: Success
|
||||
|
||||
Reference in New Issue
Block a user