can we use mathematical functions such as sin(), cos(), sqrt(), pow(), etc in Qt? If it is possible What is the header for that functions?
can we use mathematical functions such as sin(), cos(), sqrt(), pow(), etc in Qt? If it is possible What is the header for that functions?
hi JPN
Thanks for uour reply.
Few of unix flavors does not support math.h, any thoughts?
Those functions are available ECMAScript Reference in Qt but am failed to insert the header QtScript, am using Qt 4.3.2 Open Source Edition.
http://doc.trolltech.com/4.3/ecmascript.html
Thank You.
Try using "#include <cmath>" and either explicitly using "std::cos", "std::sin" etc, or putting in a "using namespace std;" line. Using the explicit form works for me on Win32 and Linux platforms.
Pete
Bookmarks