@@ -754,8 +754,8 @@ _pg_rotate_line_helper(pgLineBase *line, double angle, double rx, double ry)
754754
755755 double angle_rad = DEG_TO_RAD (angle );
756756
757- double x1 = line -> x1 , y1 = line -> y1 ;
758- double x2 = line -> x2 , y2 = line -> y2 ;
757+ double x1 = line -> xa , y1 = line -> ya ;
758+ double x2 = line -> xb , y2 = line -> yb ;
759759
760760 double cos_a = cos (angle_rad );
761761 double sin_a = sin (angle_rad );
@@ -770,11 +770,11 @@ _pg_rotate_line_helper(pgLineBase *line, double angle, double rx, double ry)
770770 double x2_new = x2 * cos_a - y2 * sin_a ;
771771 double y2_new = x2 * sin_a + y2 * cos_a ;
772772
773- line -> x1 = x1_new + rx ;
774- line -> y1 = y1_new + ry ;
773+ line -> xa = x1_new + rx ;
774+ line -> ya = y1_new + ry ;
775775
776- line -> x2 = x2_new + rx ;
777- line -> y2 = y2_new + ry ;
776+ line -> xb = x2_new + rx ;
777+ line -> yb = y2_new + ry ;
778778}
779779
780780static PyObject *
@@ -787,8 +787,8 @@ pg_line_rotate(pgLineObject *self, PyObject *const *args, Py_ssize_t nargs)
787787 pgLineBase * line = & self -> line ;
788788 double angle , rx , ry ;
789789
790- rx = (line -> x1 + line -> x2 ) / 2 ;
791- ry = (line -> y1 + line -> y2 ) / 2 ;
790+ rx = (line -> xa + line -> xb ) / 2 ;
791+ ry = (line -> ya + line -> yb ) / 2 ;
792792
793793 if (!pg_DoubleFromObj (args [0 ], & angle )) {
794794 return RAISE (PyExc_TypeError ,
@@ -821,8 +821,8 @@ pg_line_rotate_ip(pgLineObject *self, PyObject *const *args, Py_ssize_t nargs)
821821 pgLineBase * line = & self -> line ;
822822 double angle , rx , ry ;
823823
824- rx = (line -> x1 + line -> x2 ) / 2 ;
825- ry = (line -> y1 + line -> y2 ) / 2 ;
824+ rx = (line -> xa + line -> xb ) / 2 ;
825+ ry = (line -> ya + line -> yb ) / 2 ;
826826
827827 if (!pg_DoubleFromObj (args [0 ], & angle )) {
828828 return RAISE (PyExc_TypeError ,
0 commit comments