Use vclampf(value, low, high) whereever possible, #4942

This commit is contained in:
heckflosse
2018-11-05 19:50:24 +01:00
parent 8a31f0368c
commit b8af63bb04
7 changed files with 28 additions and 27 deletions

View File

@@ -1368,8 +1368,9 @@ static INLINE vfloat xcbrtf(vfloat d) {
return y;
}
static INLINE vfloat LIMV( vfloat a, vfloat b, vfloat c ) {
return vmaxf( b, vminf(a,c));
static INLINE vfloat vclampf(vfloat value, vfloat low, vfloat high) {
// clamps value in [low;high], returns low if value is NaN
return vmaxf(vminf(high, value), low);
}
static INLINE vfloat SQRV(vfloat a){