upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/gameinput_test.cpp
diff options
context:
space:
mode:
authordcastell1 <dcastell1@users.noreply.github.com>2026-11-22 10:36:36 +0100
committerdcastell1 <dcastell1@users.noreply.github.com>2026-11-22 10:36:36 +0100
commit4cb0e0d88416a2087de6c96299daf42468618d57 (patch)
treebea1aaf35cf811b82571b50667e696ee48b75778 /runtime/test/gameinput_test.cpp
parent426023a585b47ba04509d5f3e5e52d6ae40e1109 (diff)
translator: reduce v_sin/v_cos in turns before scaling by 2*pi
RDNA takes the operand in turns and range-reduces in turns. Scaling by 2*pi first loses the fractional part for large inputs (up to 1e-4 at 255 turns) and leaves Sin outside [-pi, pi], where Vulkan does not guarantee its precision. Add Gen.turn_angle: Fract, centre to [-0.5, 0.5), keep -0 as -0, then scale. Use it for both the f32 and f16 paths. Adds semantic tests at 100.3 and 254.51 turns (old translation is 1.4e-5 off), f16 at 100 turns, and -0 sign preservation; the mutation anchor is updated to the shared helper.
Diffstat (limited to 'runtime/test/gameinput_test.cpp')
0 files changed, 0 insertions, 0 deletions