Skip to content

Instantly share code, notes, and snippets.

@rcombs
Created March 12, 2015 20:28
Show Gist options
  • Save rcombs/454457d6979b5a8d9ee8 to your computer and use it in GitHub Desktop.
Save rcombs/454457d6979b5a8d9ee8 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment