test triangle rendered?
This commit is contained in:
@@ -139,4 +139,16 @@ static inline com_fix_t com_fix_tan(com_fix_t a) {
|
||||
return com_fix_div(s, c);
|
||||
}
|
||||
|
||||
/* Branchless min.
|
||||
* https://graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax */
|
||||
static inline com_fix_t com_fix_min(com_fix_t x, com_fix_t y) {
|
||||
return y ^ ((x ^ y) & -(x < y));
|
||||
}
|
||||
|
||||
/* Branchless max.
|
||||
* https://graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax */
|
||||
static inline com_fix_t com_fix_max(com_fix_t x, com_fix_t y) {
|
||||
return x ^ ((x ^ y) & -(x < y));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user