mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-13 08:09:39 +00:00
use fabs instead of abs for floats, needed for gcc 3.4.5
This commit is contained in:
parent
3285a3a1ae
commit
ca9bbde2dd
@ -24,6 +24,9 @@
|
||||
History
|
||||
|
||||
$Log$
|
||||
Revision 1.3 2006/03/29 07:30:54 zifnab1974
|
||||
use fabs instead of abs for floats, needed for gcc 3.4.5
|
||||
|
||||
Revision 1.2 2006/01/31 14:44:41 mariolatronico
|
||||
removed unused and commented old code
|
||||
|
||||
@ -114,13 +117,13 @@ namespace vcg{
|
||||
Point3f tras = Cmin;
|
||||
tras.Zero();
|
||||
if ( Cmin.X() < 0.00000001 ) {
|
||||
tras.X() =abs( Cmin.X());
|
||||
tras.X() = fabs( Cmin.X());
|
||||
}
|
||||
if ( Cmin.Y() < 0.00000001 ) {
|
||||
tras.Y() = abs(Cmin.Y());
|
||||
tras.Y() = fabs(Cmin.Y());
|
||||
}
|
||||
if ( Cmin.Z() < 0.00000001 ) {
|
||||
tras.Z() = abs(Cmin.Z());
|
||||
tras.Z() = fabs(Cmin.Z());
|
||||
}
|
||||
|
||||
//Passo di divisione per ogni asse della bounding box
|
||||
|
||||
@ -26,6 +26,9 @@
|
||||
|
||||
/*
|
||||
$Log$
|
||||
Revision 1.3 2006/03/29 07:30:54 zifnab1974
|
||||
use fabs instead of abs for floats, needed for gcc 3.4.5
|
||||
|
||||
Revision 1.2 2006/01/31 18:24:44 mariolatronico
|
||||
- dial updated only if rotate line edit has non negative numbers.
|
||||
This allows negative numbers on rotate line edit
|
||||
@ -235,8 +238,8 @@ void TransformDialog::on_mvCenterOriginPB_clicked() {
|
||||
// scale to unit box
|
||||
void TransformDialog::on_scaleUnitPB_clicked() {
|
||||
// get the bounding box longest edge
|
||||
float scale =1.0 / (float)( max(abs(maxBbox[0] - minBbox[0]),
|
||||
max(abs(maxBbox[1] - minBbox[1]), abs(maxBbox[2] - minBbox[2]))));
|
||||
float scale =1.0 / (float)( max(fabs(maxBbox[0] - minBbox[0]),
|
||||
max(fabs(maxBbox[1] - minBbox[1]), fabs(maxBbox[2] - minBbox[2]))));
|
||||
setScale(QString().setNum(scale), QString().setNum(scale), QString().setNum(scale));
|
||||
}
|
||||
// do the real calculations
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user