min/max functions
This commit is contained in:
parent
36aba4db78
commit
39dbd843f7
17
v3.h
17
v3.h
@ -25,6 +25,23 @@ sign(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static inline float
|
||||||
|
min(
|
||||||
|
const float a,
|
||||||
|
const float b
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return a < b ? a : b;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline float
|
||||||
|
max(
|
||||||
|
const float a,
|
||||||
|
const float b
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return a > b ? a : b;
|
||||||
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user