Вопрос Поделитесь пожалуйста кодом на Circle на игровой рисовке

Код:
Expand Collapse Copy
    void circle( float x , float y , float points , float radius , uint32_t color ) {
        float step = m_pi * 2.0f / points;

        for ( float a = 0; a < ( m_pi * 2.0f ); a += step ) {
            float start_x = radius * cos( a ) + x;
            float start_y = radius * sin( a ) + y;
            float end_x = radius * cos( a + step ) + x;
            float end_y = radius * sin( a + step ) + y;

            line( start_x , start_y , end_x , end_y , color );
        }
    }
 
Назад
Сверху Снизу