QAtan2 result is always one
QML and Qt Quick
4
Posts
2
Posters
1.2k
Views
1
Watching
-
@gx=ps[0]-(0.5ps[2])-(0.5ps[1]);
gy=(0.866ps[2])-(0.866ps[1]);
theta=qAtan2(gy,gx);
angle[tool]=((theta)*180/3.14);@The code above is working perfectly
But below code is not working .below code is in the if statement while above is another statement
@spe=qAtan2(ps_max[0],urt);@
I have checked ps_max[0].....value always get changed and also value of urt is changed too.
BUT spe is always equal to 1. Why?both declaration of spe and theta are same. BUT why result of spe doesnt changing?
qxoz: code tags added