summaryrefslogtreecommitdiffstats
path: root/tests/vector_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-03-27 14:46:09 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-03-27 14:46:09 +0000
commit46b36627ff6184fed301ab68c428a26ac5412cda (patch)
tree567f5673cad427d22601f9823d8fb1fdb3e400c7 /tests/vector_test.php
parent8c9729064b7d8fde5aa75701c799e4ea0181f23c (diff)
downloadzetacomponents-graph-46b36627ff6184fed301ab68c428a26ac5412cda.zip
zetacomponents-graph-46b36627ff6184fed301ab68c428a26ac5412cda.tar.gz
- Added private classes for more convenient coordinate and vector
transformations
Diffstat (limited to 'tests/vector_test.php')
-rw-r--r--tests/vector_test.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/vector_test.php b/tests/vector_test.php
index acab733..f588d65 100644
--- a/tests/vector_test.php
+++ b/tests/vector_test.php
@@ -271,6 +271,26 @@ class ezcGraphVectorTest extends ezcTestCase
'Result should be the vector itself'
);
}
+
+ public function testVectorTransform()
+ {
+ $vector = new ezcGraphVector( 0, 0 );
+
+ $result = $vector->transform( new ezcGraphRotation( -90, new ezcGraphCoordinate( 15, 15 ) ) );
+
+ $this->assertEquals(
+ $vector,
+ new ezcGraphVector( 0, 30 ),
+ 'Vector transformation does not have the expected result',
+ .0001
+ );
+
+ $this->assertEquals(
+ $result,
+ $vector,
+ 'Result should be the vector itself'
+ );
+ }
}
?>
OpenPOWER on IntegriCloud