cbm80amiga / ST7789_3D_Filled_Vector_Ext

ST7789/ST7735 and STM32 3D Filled Vector Graphics
GNU Lesser General Public License v3.0
51 stars 12 forks source link

division by zero exception #4

Open anchor76 opened 3 years ago

anchor76 commented 3 years ago

hello,

just a small fix: in gfx3d.h, in function updateStars(), after line: stars[i].z -= starSpeed; i added:

if (stars[i].z <= 0)
{
        stars[i].z = 1;
}

to avoid the random division by zero exception.

thanks for the attention.

and, Amiga rulez ;)