Skip to content
Snippets Groups Projects
Commit 96b08c4a authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Complex: Add c{double,float}_abs_squared

parent 717cf0c1
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@
REAL_TP TPROOT##_real(TP a) { return a.real; } \
REAL_TP TPROOT##_imag(TP a) { return a.imag; } \
REAL_TP TPROOT##_abs(TP a) { return hypot(a.real, a.imag); } \
REAL_TP TPROOT##_abs_squared(TP a) { return a.real * a.real + a.imag * a.imag; } \
\
TP TPROOT##_new(REAL_TP real, REAL_TP imag) \
{ \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment