mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-19 06:14:03 +00:00
One really should use braces when mixing additions and multiplication and
2004-03-31 Simon Budig <simon@gimp.org> * app/tools/gimptransformtool.c: One really should use braces when mixing additions and multiplication and the operator precedence is not the desired one... I feel stupid... :-)
This commit is contained in:
parent
4de398bb37
commit
157af2d30c
|
@ -1,3 +1,11 @@
|
|||
2004-03-31 Simon Budig <simon@gimp.org>
|
||||
|
||||
* app/tools/gimptransformtool.c: One really should use braces
|
||||
when mixing additions and multiplication and the operator
|
||||
precedence is not the desired one...
|
||||
|
||||
I feel stupid... :-)
|
||||
|
||||
2004-03-31 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/gimp-transform-utils.c
|
||||
|
|
|
@ -685,14 +685,14 @@ gimp_transform_tool_draw (GimpDrawTool *draw_tool)
|
|||
* if z1 and z2 have the same sign as well as z3 and z4
|
||||
* the polygon is convex.
|
||||
*/
|
||||
z1 = (tr_tool->tx2-tr_tool->tx1 * tr_tool->ty4-tr_tool->ty1 -
|
||||
tr_tool->tx4-tr_tool->tx1 * tr_tool->ty2-tr_tool->ty1);
|
||||
z2 = (tr_tool->tx4-tr_tool->tx1 * tr_tool->ty3-tr_tool->ty1 -
|
||||
tr_tool->tx3-tr_tool->tx1 * tr_tool->ty4-tr_tool->ty1);
|
||||
z3 = (tr_tool->tx4-tr_tool->tx2 * tr_tool->ty3-tr_tool->ty2 -
|
||||
tr_tool->tx3-tr_tool->tx2 * tr_tool->ty4-tr_tool->ty2);
|
||||
z4 = (tr_tool->tx3-tr_tool->tx2 * tr_tool->ty1-tr_tool->ty2 -
|
||||
tr_tool->tx1-tr_tool->tx2 * tr_tool->ty3-tr_tool->ty2);
|
||||
z1 = ((tr_tool->tx2 - tr_tool->tx1) * (tr_tool->ty4 - tr_tool->ty1) -
|
||||
(tr_tool->tx4 - tr_tool->tx1) * (tr_tool->ty2 - tr_tool->ty1));
|
||||
z2 = ((tr_tool->tx4 - tr_tool->tx1) * (tr_tool->ty3 - tr_tool->ty1) -
|
||||
(tr_tool->tx3 - tr_tool->tx1) * (tr_tool->ty4 - tr_tool->ty1));
|
||||
z3 = ((tr_tool->tx4 - tr_tool->tx2) * (tr_tool->ty3 - tr_tool->ty2) -
|
||||
(tr_tool->tx3 - tr_tool->tx2) * (tr_tool->ty4 - tr_tool->ty2));
|
||||
z4 = ((tr_tool->tx3 - tr_tool->tx2) * (tr_tool->ty1 - tr_tool->ty2) -
|
||||
(tr_tool->tx1 - tr_tool->tx2) * (tr_tool->ty3 - tr_tool->ty2));
|
||||
|
||||
/* Draw the grid (not for path transform since it looks ugly) */
|
||||
|
||||
|
|
Loading…
Reference in a new issue