summaryrefslogtreecommitdiffstats
path: root/Project/Inductor.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-12-15 17:24:24 -0200
committerGitHub <noreply@github.com>2016-12-15 17:24:24 -0200
commit28e9cc4d9df63cb12c01d49017172c5f39ca9c22 (patch)
tree7896e1bb7cc5f42751c5d31ec99ba2bdf19d6f6c /Project/Inductor.cpp
parentcff8d90d61be4d34f5e84e8dd0933f678e6214be (diff)
parent5cdfee44e75b9a3635350aa261818e0a3bb44c5f (diff)
downloadPSP.git-28e9cc4d9df63cb12c01d49017172c5f39ca9c22.tar.gz
PSP.git-28e9cc4d9df63cb12c01d49017172c5f39ca9c22.tar.xz
PSP.git-28e9cc4d9df63cb12c01d49017172c5f39ca9c22.zip
Merge pull request #3 from Thales1330/wip/save-load-xml
Wip/save load xml
Diffstat (limited to 'Project/Inductor.cpp')
-rw-r--r--Project/Inductor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Project/Inductor.cpp b/Project/Inductor.cpp
index 9c85d9a..9c13f15 100644
--- a/Project/Inductor.cpp
+++ b/Project/Inductor.cpp
@@ -89,6 +89,7 @@ void Inductor::Rotate(bool clockwise)
if(!clockwise) rotAngle = -m_rotationAngle;
m_angle += rotAngle;
+ if(m_angle >= 360 || m_angle <= -360) m_angle = 0.0;
m_pointList[2] = RotateAtPosition(m_pointList[2], rotAngle);
m_pointList[3] = RotateAtPosition(m_pointList[3], rotAngle);
UpdateSwitchesPosition();