mirror of
https://github.com/geekammo/MicroView-Arduino-Library.git
synced 2026-02-20 11:31:24 +01:00
Fix compiler warning: signed/unsigned comparison
This commit is contained in:
@@ -631,11 +631,11 @@ void MicroView::circleFill(uint8_t x0, uint8_t y0, uint8_t radius, uint8_t color
|
||||
bool intersected = false;
|
||||
|
||||
// Optimization: relative x squared only changes with the outer loop/the horizontal scan.
|
||||
int16_t rx2 = (x-x0) * (x-x0);
|
||||
uint16_t rx2 = (x-x0) * (x-x0);
|
||||
|
||||
// Scan vertically...
|
||||
for (uint16_t y = yStart; y <= yEnd; ++y) {
|
||||
int16_t ry2 = (y-y0) * (y-y0);
|
||||
uint16_t ry2 = (y-y0) * (y-y0);
|
||||
if (rx2 + ry2 <= radiusSq) {
|
||||
pixel(x, y, color, mode);
|
||||
intersected = true;
|
||||
|
||||
Reference in New Issue
Block a user