We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2188187 commit 488e6a2Copy full SHA for 488e6a2
src/_path.cpp
@@ -1159,14 +1159,24 @@ _path_module::affine_transform(const Py::Tuple& args)
1159
size_t stride1 = PyArray_STRIDE(vertices, 1);
1160
double x;
1161
double y;
1162
+ volatile double t0;
1163
+ volatile double t1;
1164
+ volatile double t;
1165
1166
for (size_t i = 0; i < n; ++i)
1167
{
1168
x = *(double*)(vertex_in);
1169
y = *(double*)(vertex_in + stride1);
1170
- *vertex_out++ = a * x + c * y + e;
- *vertex_out++ = b * x + d * y + f;
1171
+ t0 = a * x;
1172
+ t1 = c * y;
1173
+ t = t0 + t1 + e;
1174
+ *(vertex_out++) = t;
1175
+
1176
+ t0 = b * x;
1177
+ t1 = d * y;
1178
+ t = t0 + t1 + f;
1179
1180
1181
vertex_in += stride0;
1182
}
0 commit comments