From 5c3ed3e6feb6e15179d1bc9599cb15150fa07bff Mon Sep 17 00:00:00 2001 From: Rodger Combs Date: Thu, 12 Mar 2015 15:30:26 -0500 Subject: Fix range in rot_key Oops, trig is hard. We output from -pi to +pi now. --- libass/ass_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3