Added more functions for halfvec

This commit is contained in:
Andrew Kane
2024-04-14 13:12:08 -07:00
parent 45cea30943
commit c68c2867fd
7 changed files with 604 additions and 2 deletions

View File

@@ -41,6 +41,19 @@ HalfIsInf(half num)
#endif
}
/*
* Check if half is zero
*/
static inline bool
HalfIsZero(half num)
{
#ifdef FLT16_SUPPORT
return num == 0;
#else
return (num & 0x7FFF) == 0x0000;
#endif
}
/*
* Convert a half to a float4
*/