Skip to content

Commit 366aee3

Browse files
committed
feat(math): add CMath::mulhwu
1 parent df9148b commit 366aee3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tempest/math/CMath.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ class CMath {
5454
return static_cast<uint32_t>(n + 0.99994999);
5555
}
5656

57+
static uint32_t mulhwu(uint32_t x, uint32_t y) {
58+
return (y * static_cast<uint64_t>(x)) >> 32;
59+
}
60+
5761
static uint32_t rotl3(uint32_t v) {
5862
return (v << 3) | (v >> 29);
5963
}

0 commit comments

Comments
 (0)