C++ (Qt) void test() { m_points.append(QPoint(10,10)); m_points.append(QPoint(10,10)); m_points.append(QPoint(10,10)); a *massive = new a[m_points.size()]; for(int i=0; i<m_points.size(); i++) { massive[i].begin = 1; massive[i].end = 2; } }
for(int i=0; i<j; i++) { float deltaX = qAbs(ptv_vector[vetka[i]].end.x() - ptv_vector[vetka[i]].begin.x()); float deltaY = qAbs(ptv_vector[vetka[i]].end.y() - ptv_vector[vetka[i]].begin.y()); float rads = atan2(float(deltaY),deltaX); if(rads<0) rads += PI2; angle[i] = rads; qDebug() << QString("rebro") << angle[i]; }
C++ (Qt)float rads = atan2(float(-deltaY),deltaX);