diff options
author | neoraider <devnull@localhost> | 2008-02-08 22:21:01 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2008-02-08 22:21:01 +0100 |
commit | acb1721e94a49a4941bb11dfc2f832c3848aa204 (patch) | |
tree | 6398053a11b46242974ae171d700418bd42c92b8 /Vertex.cpp | |
parent | a39525ca36e2c002332f914907f74061533c2b04 (diff) | |
download | zoomedit-acb1721e94a49a4941bb11dfc2f832c3848aa204.tar zoomedit-acb1721e94a49a4941bb11dfc2f832c3848aa204.zip |
zoomedit: Implemented Rotate tool; added simple gates.
Diffstat (limited to 'Vertex.cpp')
-rw-r--r-- | Vertex.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -18,6 +18,14 @@ Vertex Vertex::operator-(const Vertex &v) const { return Vertex(x - v.x, y - v.y); } +Vertex Vertex::operator*(float f) const { + return Vertex(x*f, y*f); +} + +Vertex Vertex::operator/(float f) const { + return Vertex(x/f, y/f); +} + Vertex& Vertex::operator+=(const Vertex &v) { x += v.x; y += v.y; @@ -31,3 +39,17 @@ Vertex& Vertex::operator-=(const Vertex &v) { return *this; } + +Vertex& Vertex::operator*=(float f) { + x *= f; + y *= f; + + return *this; +} + +Vertex& Vertex::operator/=(float f) { + x /= f; + y /= f; + + return *this; +} |