From b04d5702719eca30a95d1db2a927b6605ebd3477 Mon Sep 17 00:00:00 2001 From: nathansmith117 Date: Mon, 10 Feb 2025 01:12:55 -0700 Subject: Some fast math stuff added --- test/scanTest1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/scanTest1.c') 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); } -- cgit v1.2.3