summaryrefslogtreecommitdiff
path: root/basegfx/source
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2003-11-11 08:56:10 +0000
committerArmin Weiss <aw@openoffice.org>2003-11-11 08:56:10 +0000
commitdb78936286f5b9adf396e92383041b4f515b0edd (patch)
treef143d7659bc49e44d5451fe6a89258f137f24d36 /basegfx/source
parentd2e3aaa262de3815c4ba165590ee5e98e5db2ac5 (diff)
added B2DVector::angle
Diffstat (limited to 'basegfx/source')
-rw-r--r--basegfx/source/vector/b2dvector.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/basegfx/source/vector/b2dvector.cxx b/basegfx/source/vector/b2dvector.cxx
index 1177396fefd1..23044076d539 100644
--- a/basegfx/source/vector/b2dvector.cxx
+++ b/basegfx/source/vector/b2dvector.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dvector.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: aw $ $Date: 2003-11-10 11:45:52 $
+ * last change: $Author: aw $ $Date: 2003-11-11 09:56:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -116,6 +116,12 @@ namespace basegfx
return((mfX * rVec.mfX) + (mfY * rVec.mfY));
}
+ double B2DVector::angle( const B2DVector& rVec ) const
+ {
+ return atan2(mfX * rVec.getY() - mfY * rVec.getX(),
+ mfX * rVec.getX() + mfY * rVec.getY());
+ }
+
const B2DVector& B2DVector::getEmptyVector()
{
return (const B2DVector&) ::basegfx::tuple::B2DTuple::getEmptyTuple();