Someone forgot to include <cmath> and use the std namespace for fabs() - I fixed it, it didn't build on my system

git-svn-id: http://svn.osgeo.org/qgis/trunk@3012 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
larsl 2005-03-23 14:00:42 +00:00
parent e3425df4a5
commit e7468e3304

View File

@ -19,6 +19,7 @@
#include "qgsclipper.h"
#include <cmath>
#include <iostream>
bool QgsClipper::trimLine(const QgsPoint& from, const QgsPoint& to,
@ -79,7 +80,7 @@ bool QgsClipper::trimLine(const QgsPoint& from, const QgsPoint& to,
double dTB = - (to.y() - from.y()) * (maxX - minX);
double s_n;
if (fabs(dTB) > SMALL_NUM && fabs(r_n) > SMALL_NUM)
if (std::fabs(dTB) > SMALL_NUM && std::fabs(r_n) > SMALL_NUM)
{
s_n = (from.y() - minY) * (to.x() - from.x())
- (from.x() - minX) * (to.y() - from.y());