diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-04-30 11:32:05 +0200 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-04-30 15:55:25 +0100 |
commit | a61bb97a5ddbf63472044447f10ee6b3bd336ed8 (patch) | |
tree | 4c0ae6af74b61aee25f483b79088b4299d67e415 /fitz/text_paragraph.c | |
parent | c5fe69a30dc09a094c6f8237b7f8bf72dc1768b0 (diff) | |
download | mupdf-a61bb97a5ddbf63472044447f10ee6b3bd336ed8.tar.xz |
Move fz_normalize_vector into base_geometry.c
Diffstat (limited to 'fitz/text_paragraph.c')
-rw-r--r-- | fitz/text_paragraph.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/fitz/text_paragraph.c b/fitz/text_paragraph.c index d303cb30..b7828a81 100644 --- a/fitz/text_paragraph.c +++ b/fitz/text_paragraph.c @@ -11,18 +11,6 @@ #undef SPOT_LINE_NUMBERS -static inline void -normalise(fz_point *p) -{ - float len = p->x * p->x + p->y * p->y; - if (len != 0) - { - len = sqrtf(len); - p->x /= len; - p->y /= len; - } -} - typedef struct line_height_s { float height; @@ -1199,7 +1187,7 @@ force_paragraph: blv = line->spans[0]->max; blv.x -= line->spans[0]->min.x; blv.y -= line->spans[0]->min.y; - normalise(&blv); + fz_normalize_vector(&blv); rm = new_region_mask(ctx, &blv); for (span_num = 0; span_num < line->len; span_num++) @@ -1284,7 +1272,7 @@ force_paragraph: blv = line->spans[0]->max; blv.x -= line->spans[0]->min.x; blv.y -= line->spans[0]->min.y; - normalise(&blv); + fz_normalize_vector(&blv); #ifdef DEBUG_MASKS dump_line(line); |