diff options
author | Rodger Combs <rodger.combs@gmail.com> | 2015-03-12 15:30:26 -0500 |
---|---|---|
committer | Rodger Combs <rodger.combs@gmail.com> | 2015-03-12 15:30:26 -0500 |
commit | 5c3ed3e6feb6e15179d1bc9599cb15150fa07bff (patch) | |
tree | d3f750c7a0e91377b1bd1ea1ad05e9e8e94fd2ed | |
parent | e5b86309cf3117cb0a3a4523ae42d483c5356f15 (diff) | |
download | libass-5c3ed3e6feb6e15179d1bc9599cb15150fa07bff.tar.bz2 libass-5c3ed3e6feb6e15179d1bc9599cb15150fa07bff.tar.xz |
Fix range in rot_key
Oops, trig is hard. We output from -pi to +pi now.
-rw-r--r-- | libass/ass_utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass_utils.h b/libass/ass_utils.h index b9af979..2a4c368 100644 --- a/libass/ass_utils.h +++ b/libass/ass_utils.h @@ -163,7 +163,7 @@ static inline int double_to_d22(double x) // Calculate cache key for a rotational angle in degrees static inline int rot_key(double a) { - return double_to_d22(fmod(a, M_PI)); + return double_to_d22(remainder(a, 2 * M_PI)); } #define FNV1_32A_INIT 0x811c9dc5U |