diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-01-31 10:19:05 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-01-31 10:19:05 +0000 |
commit | d2590482f69b98dc6200e02ec194ea14f81730a5 (patch) | |
tree | cc20ba94567c66c8c678bdfd964941dc65a302ec /src/math | |
parent | 0160678109ddc1f4887b2c06df73a6de827c9bd2 (diff) | |
download | zetacomponents-graph-d2590482f69b98dc6200e02ec194ea14f81730a5.zip zetacomponents-graph-d2590482f69b98dc6200e02ec194ea14f81730a5.tar.gz |
- Renamed rotation methods
- Added tests for vector rotation
Diffstat (limited to 'src/math')
-rw-r--r-- | src/math/vector.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/math/vector.php b/src/math/vector.php index efe44b3..85832bb 100644 --- a/src/math/vector.php +++ b/src/math/vector.php @@ -21,11 +21,11 @@ class ezcGraphVector extends ezcGraphCoordinate * * @return void */ - public function toLeft() + public function rotateCounterClockwise() { $tmp = $this->x; - $this->x = -$this->y; - $this->y = $tmp; + $this->x = $this->y; + $this->y = -$tmp; return $this; } @@ -35,11 +35,11 @@ class ezcGraphVector extends ezcGraphCoordinate * * @return void */ - public function toRight() + public function rotateClockwise() { $tmp = $this->x; - $this->x = $this->y; - $this->y = -$tmp; + $this->x = -$this->y; + $this->y = $tmp; return $this; } |