From de7df0b41c0fdc60c84085ee46262d42eac209ee Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sun, 18 Jan 2015 20:17:58 -0300 Subject: [PATCH] poly2d/p2d_attrib.c (angle_3): put spaces around operators --- poly2d/p2d_attrib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/poly2d/p2d_attrib.c b/poly2d/p2d_attrib.c index 1e7fc7b..5158e78 100644 --- a/poly2d/p2d_attrib.c +++ b/poly2d/p2d_attrib.c @@ -29,17 +29,17 @@ static double angle_3(const struct v2d *a, const struct v2d *b, double aa, bb; double angle; - ax = b->x-a->x; - ay = b->y-a->y; - bx = c->x-b->x; - by = c->y-b->y; + ax = b->x - a->x; + ay = b->y - a->y; + bx = c->x - b->x; + by = c->y - b->y; aa = hypot(ax, ay); 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; } /*