Skip to content

Commit 43994b3

Browse files
f3schdavidrohr
authored andcommitted
GPU: CommonMath add remainderf
1 parent 1dc0877 commit 43994b3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

GPU/Common/GPUCommonMath.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ class GPUCommonMath
9696
GPUd() constexpr static uint32_t Float2UIntRn(float x) { return (uint32_t)(int32_t)(x + 0.5f); }
9797
GPUd() constexpr static int32_t Float2IntRn(float x);
9898
GPUd() constexpr static float Modf(float x, float y);
99+
GPUhdi() static float Remainderf(float x, float y);
99100
GPUd() constexpr static bool Finite(float x);
100101
GPUd() constexpr static bool IsNaN(float x);
101102
GPUd() constexpr static float QuietNaN() { return GPUCA_CHOICE(std::numeric_limits<float>::quiet_NaN(), __builtin_nanf(""), nan(0u)); }
@@ -236,6 +237,7 @@ GPUdi() float2 GPUCommonMath::MakeFloat2(float x, float y)
236237
}
237238

238239
GPUdi() constexpr float GPUCommonMath::Modf(float x, float y) { return GPUCA_CHOICE(fmodf(x, y), fmodf(x, y), fmod(x, y)); }
240+
GPUhdi() float GPUCommonMath::Remainderf(float x, float y) { return GPUCA_CHOICE(std::remainderf(x, y), remainderf(x, y), remainder(x, y)); }
239241

240242
GPUdi() uint32_t GPUCommonMath::Float2UIntReint(const float& x)
241243
{

0 commit comments

Comments
 (0)