summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-12-06 11:55:48 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2016-12-07 00:59:00 +0000
commit4b6c66daa8a4865bd7e3350c4a0307575d2aff63 (patch)
treeb5f8765e8ae741401157a2409da72dca525049d1 /starmath
parent798c832dc35f65786f6ec30d5e851a27886e8cfd (diff)
starmath: Require that they are non-0 vectors
Otherwise, division by zero would happen. Change-Id: I77fde7da87f32ba530482e80623bb449313cf986 Reviewed-on: https://gerrit.libreoffice.org/31670 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/node.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index a37236db4224..e941c2d49e30 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -903,7 +903,7 @@ double Det(const Point &rHeading1, const Point &rHeading2)
bool IsPointInLine(const Point &rPoint1,
const Point &rPoint2, const Point &rHeading2)
{
- OSL_ENSURE(rHeading2 != Point(), "Sm : 0 vector");
+ assert(rHeading2 != Point());
bool bRes = false;
static const double eps = 5.0 * DBL_EPSILON;
@@ -928,8 +928,8 @@ sal_uInt16 GetLineIntersectionPoint(Point &rResult,
const Point& rPoint1, const Point &rHeading1,
const Point& rPoint2, const Point &rHeading2)
{
- OSL_ENSURE(rHeading1 != Point(), "Sm : 0 vector");
- OSL_ENSURE(rHeading2 != Point(), "Sm : 0 vector");
+ assert(rHeading1 != Point());
+ assert(rHeading2 != Point());
sal_uInt16 nRes = 1;
static const double eps = 5.0 * DBL_EPSILON;