diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2008-12-26 20:28:54 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2008-12-27 16:25:51 -0500 |
commit | f2f62c7c4402a28a65c8171238d163af6b2fb95a (patch) | |
tree | 3e1b9fe168787c89e1110334d6c6c302c144fb60 /src/cairo-font-face-twin.c | |
parent | 50bc2bc0170be2a9c84ae3064525b18190e22b48 (diff) | |
download | cairo-f2f62c7c4402a28a65c8171238d163af6b2fb95a.tar.gz |
[twin] Micro-optimize
Diffstat (limited to 'src/cairo-font-face-twin.c')
-rw-r--r-- | src/cairo-font-face-twin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-font-face-twin.c b/src/cairo-font-face-twin.c index 4fe6f8933..c905b27db 100644 --- a/src/cairo-font-face-twin.c +++ b/src/cairo-font-face-twin.c @@ -235,7 +235,7 @@ compute_hinting_scale (cairo_t *cr, double *scale, double *inv) { cairo_user_to_device_distance (cr, &x, &y); - *scale = sqrt (x*x + y*y); + *scale = x == 0 ? y : y == 0 ? x :sqrt (x*x + y*y); *inv = 1 / *scale; } |