mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 06:34:01 +00:00
math: ++missing exceptions
This commit is contained in:
parent
0dc8b8cde7
commit
ef75fbcbb9
1 changed files with 1 additions and 0 deletions
|
@ -103,6 +103,7 @@ namespace tvg {
|
|||
//https://en.wikipedia.org/wiki/Remez_algorithm
|
||||
float atan2(float y, float x)
|
||||
{
|
||||
if (y == 0.0f && x == 0.0f) return 0.0f;
|
||||
auto a = std::min(fabsf(x), fabsf(y)) / std::max(fabsf(x), fabsf(y));
|
||||
auto s = a * a;
|
||||
auto r = ((-0.0464964749f * s + 0.15931422f) * s - 0.327622764f) * s * a + a;
|
||||
|
|
Loading…
Add table
Reference in a new issue