brenocq / atta

Simulator for multi-robot systems
https://atta.brenocq.com
MIT License
19 stars 4 forks source link

error: no member named 'sqrt' in namespace 'std'; did you mean simply 'sqrt'? #2

Closed yurivict closed 3 years ago

yurivict commented 3 years ago
/usr/ports/misc/atta/work/Atta-c3bc91c/src/./simulator/math/vector.h:620:12: error: no member named 'sqrt' in namespace 'std'; did you mean simply 'sqrt'?
                                return std::sqrt(squareLength());
                                       ^~~~~~~~~
                                       sqrt
/usr/include/c++/v1/math.h:1085:1: note: 'sqrt' declared here
sqrt(_A1 __lcpp_x) _NOEXCEPT {return ::sqrt((double)__lcpp_x);}
^

Did you forget to include <cmath>?

brenocq commented 3 years ago

Ops, thanks! Fixed in the last commit.