mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-06-30 21:36:33 -04:00
--User changes
-cosh, coth, csch, sech, sinh, tanh: Scale inputs by PI/4. This will produce different results, but is technically more correct. --Code changes -cos, csch: move position of sign flip, shouldn't change output. -cot, coth, csc, csch, sec, sech, tan, tanh: add optimization.
This commit is contained in:
@ -177,6 +177,11 @@ FunctionMapper::FunctionMapper()
|
||||
"{\n"
|
||||
" return (real2)(a.x - x, a.y);\n"
|
||||
"}\n";
|
||||
s_GlobalMap["ComplexMinusComplex"] =
|
||||
"inline real2 ComplexMinusComplex(real2 a, real2 b)\n"
|
||||
"{\n"
|
||||
" return (real2)(a.x - b.x, a.y - b.y);\n"
|
||||
"}\n";
|
||||
s_GlobalMap["ComplexSqrt"] =
|
||||
"inline real2 ComplexSqrt(real2 a)\n"
|
||||
"{\n"
|
||||
@ -188,6 +193,11 @@ FunctionMapper::FunctionMapper()
|
||||
"{\n"
|
||||
" return (real2)(0.5 * log(fma(a.x, a.x, a.y * a.y)), atan2(a.y, a.x));\n"
|
||||
"}\n";
|
||||
s_GlobalMap["ComplexExp"] =
|
||||
"inline real2 ComplexExp(real2 a)\n"
|
||||
"{\n"
|
||||
" return (real2)(cos(a.y), sin(a.y)) * exp(a.x);\n"
|
||||
"}\n";
|
||||
s_GlobalMap["Hash"] =
|
||||
"inline real_t Hash(int a)\n"
|
||||
"{\n"
|
||||
|
Reference in New Issue
Block a user