test triangle rendered?

This commit is contained in:
veclavtlica
2026-09-13 22:30:19 +03:00
parent 4e1fa1ed1c
commit 578c4a6d4f
6 changed files with 193 additions and 3 deletions
+12
View File
@@ -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