summaryrefslogtreecommitdiff
path: root/basegfx/source/vector
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2005-05-10 15:05:14 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2005-05-10 15:05:14 +0000
commit1a6fa44040bea1938798be64557728221cc41449 (patch)
tree8897eaf855d77082b13607f151815b6b2579eed5 /basegfx/source/vector
parent6d54f87441730d3c47a7b93cd2968e30b3f761ee (diff)
INTEGRATION: CWS b2dnorm (1.11.26); FILE MERGED
2005/05/04 13:41:28 hdu 1.11.26.1: #i48298# normalize zero vectors gracefully
Diffstat (limited to 'basegfx/source/vector')
-rw-r--r--basegfx/source/vector/b2dvector.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/basegfx/source/vector/b2dvector.cxx b/basegfx/source/vector/b2dvector.cxx
index a9d7945a37b2..ba1b557538aa 100644
--- a/basegfx/source/vector/b2dvector.cxx
+++ b/basegfx/source/vector/b2dvector.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dvector.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: pjunck $ $Date: 2004-11-03 08:40:02 $
+ * last change: $Author: rt $ $Date: 2005-05-10 16:05:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,7 +77,12 @@ namespace basegfx
{
double fLen(scalar(*this));
- if(!::basegfx::fTools::equalZero(fLen))
+ if(::basegfx::fTools::equalZero(fLen))
+ {
+ mfX = 0.0;
+ mfY = 0.0;
+ }
+ else
{
const double fOne(1.0);