mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-23 03:59:00 +02:00
poly2d/p2d_attrib.c (angle_3): put spaces around operators
This commit is contained in:
parent
6084b52c15
commit
de7df0b41c
@ -29,17 +29,17 @@ static double angle_3(const struct v2d *a, const struct v2d *b,
|
|||||||
double aa, bb;
|
double aa, bb;
|
||||||
double angle;
|
double angle;
|
||||||
|
|
||||||
ax = b->x-a->x;
|
ax = b->x - a->x;
|
||||||
ay = b->y-a->y;
|
ay = b->y - a->y;
|
||||||
bx = c->x-b->x;
|
bx = c->x - b->x;
|
||||||
by = c->y-b->y;
|
by = c->y - b->y;
|
||||||
|
|
||||||
aa = hypot(ax, ay);
|
aa = hypot(ax, ay);
|
||||||
bb = hypot(bx, by);
|
bb = hypot(bx, by);
|
||||||
|
|
||||||
angle = acos((ax*bx+ay*by)/aa/bb)/M_PI*180.0;
|
angle = acos((ax * bx + ay * by) / aa / bb) / M_PI * 180.0;
|
||||||
|
|
||||||
return (ax*by-ay*bx) >= 0 ? angle : -angle;
|
return ax * by - ay * bx >= 0 ? angle : -angle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user