aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2020-08-23 12:20:18 -0400
committerFranklin Wei <franklin@rockbox.org>2020-08-23 12:20:18 -0400
commitc40d6aca2758a796f0f742b5d8a6e04ddf4ae8b6 (patch)
treee4e711ffb4b09c21c67126ebcc105bfd049d4d05
parent960798bb86127fcb0375b4679bb980ab8af8ee65 (diff)
downloadlibfml-c40d6aca2758a796f0f742b5d8a6e04ddf4ae8b6.zip
libfml-c40d6aca2758a796f0f742b5d8a6e04ddf4ae8b6.tar.gz
libfml-c40d6aca2758a796f0f742b5d8a6e04ddf4ae8b6.tar.bz2
libfml-c40d6aca2758a796f0f742b5d8a6e04ddf4ae8b6.tar.xz
Replace sincos() with vanilla sin() and cos()HEADmaster
sincos() is a GNU extension and causes problems on macOS.
-rw-r--r--src/vec2.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vec2.cpp b/src/vec2.cpp
index 509a519..eb3936e 100644
--- a/src/vec2.cpp
+++ b/src/vec2.cpp
@@ -73,7 +73,8 @@ namespace fml {
}
vec2 vec2::rotateby(scalar angle) {
double s, c;
- sincos(angle, &s, &c);
+ s = sin(angle);
+ c = cos(angle);
return vec2(v[0] * c - v[1] * s,
v[0] * s + v[1] * c);
}