mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-19 19:14:42 +00:00
edit_paint: Fix type mismatch warning about abs
This commit is contained in:
parent
be16693467
commit
ada0fb5bdb
@ -1342,7 +1342,7 @@ void drawPercentualPolyLine(GLArea * gla, QPoint &mid, MeshModel &m, GLfloat* pi
|
||||
da = da / 2.0;
|
||||
db = db / 2.0;
|
||||
dc = dc / 2.0;
|
||||
if (fabsf(zz - pix_z) < 0.001)
|
||||
if (std::abs(zz - pix_z) < 0.001)
|
||||
{
|
||||
proj_points[i] = QPointF(pix_x, inv_yy);
|
||||
break;
|
||||
|
||||
@ -332,16 +332,17 @@ inline void fastMultiply(float x, float y, float z, double matrix[], double *xr,
|
||||
*/
|
||||
inline int getNearest(QPointF center, QPointF *points, int num)
|
||||
{
|
||||
using std::abs;
|
||||
int index = 0;
|
||||
|
||||
float dist = fabsf(center.x() - points[0].x())*fabsf(center.x() - points[0].x()) + fabsf(center.y() - points[0].y())*fabsf(center.y() - points[0].y());
|
||||
float dist = abs(center.x() - points[0].x())*abs(center.x() - points[0].x()) + abs(center.y() - points[0].y())*abs(center.y() - points[0].y());
|
||||
|
||||
float temp = 0;
|
||||
|
||||
for (int i = 1; i < num; i++)
|
||||
{
|
||||
temp = fabsf(center.x() - points[i].x())*fabsf(center.x() - points[i].x()) +
|
||||
fabsf(center.y() - points[i].y())*fabsf(center.y() - points[i].y());
|
||||
temp = abs(center.x() - points[i].x())*abs(center.x() - points[i].x()) +
|
||||
abs(center.y() - points[i].y())*abs(center.y() - points[i].y());
|
||||
|
||||
if (temp < dist) {
|
||||
index = i;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user