MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / c_sqrt

Method c_sqrt

libraries/Complex/complex.cpp:146–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144
145
146Complex Complex::c_sqrt() const
147{
148 float m = modulus();
149 float r = sqrt(0.5 * (m + re));
150 float i = sqrt(0.5 * (m - re));
151 if (im < 0) i = -i;
152 return Complex(r, i);
153}
154
155
156Complex Complex::c_exp() const

Callers 3

gonioHelper1Method · 0.80
gonioHelper2Method · 0.80
unittestFunction · 0.80

Calls 2

sqrtFunction · 0.85
ComplexClass · 0.85

Tested by 1

unittestFunction · 0.64