diff options
author | nathansmith117 <nathansmith117@sdf.org> | 2025-02-10 08:12:55 +0000 |
---|---|---|
committer | nathansmith117 <nathansmith117@sdf.org> | 2025-02-10 08:12:55 +0000 |
commit | b04d5702719eca30a95d1db2a927b6605ebd3477 (patch) | |
tree | c388a6b152c117e2903e7acf63054211739e6df4 /test/scanTest1.c | |
parent | fe9b718f8978cfd792f7303214b2dd45172b8d4b (diff) | |
download | sldj-b04d5702719eca30a95d1db2a927b6605ebd3477.tar.gz sldj-b04d5702719eca30a95d1db2a927b6605ebd3477.tar.bz2 sldj-b04d5702719eca30a95d1db2a927b6605ebd3477.zip |
Some fast math stuff added
Diffstat (limited to 'test/scanTest1.c')
-rw-r--r-- | test/scanTest1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/scanTest1.c b/test/scanTest1.c index 19d78b5..c673e04 100644 --- a/test/scanTest1.c +++ b/test/scanTest1.c @@ -16,9 +16,9 @@ Color lineScanner(uint16_t x, uint16_t y, uint32_t frameNumber) if (section >= 200) { - c = (x >> 8) + (uint8_t)(hypot(x >> 8, y >> 8) * (frameNumber % 255)); + c = (x >> 8) + (uint8_t)(hypot(x >> 8, y >> 8) * (frameNumber % 255)); } else if (section >= 100) { - c = (x >> 8) + (uint8_t)(hypot(cos(x >> scale), sin(y >> scale)) * (frameNumber % 255)); + c = (x >> 8) + (uint8_t)(hypot(cos(x >> scale), sin(y >> scale)) * (frameNumber % 255)); } else { c = frameNumber + hypot((x - 32768) >> scale, (y - 32768) >> scale); } |