EgtMachKernel :
- fabs sostituito da abs.
This commit is contained in:
+5
-5
@@ -35,7 +35,7 @@ GetRotationComponent( const Vector3d& vtDir1, double dComp, const Vector3d& vtDi
|
||||
// determino se equiversi o controversi
|
||||
bool bEquiv = ( vtDir2 * vtRotAx) > 0 ;
|
||||
// se le componenti concordano, angolo indeterminato
|
||||
if ( fabs( dT0w - ( bEquiv ? dComp : - dComp)) < 0.5 * SIN_EPS_ANG_SMALL) {
|
||||
if ( abs( dT0w - ( bEquiv ? dComp : - dComp)) < 0.5 * SIN_EPS_ANG_SMALL) {
|
||||
bDet = false ;
|
||||
return 1 ;
|
||||
}
|
||||
@@ -66,11 +66,11 @@ GetRotationComponent( const Vector3d& vtDir1, double dComp, const Vector3d& vtDi
|
||||
|
||||
// calcolo della seconda parte dell'angolo
|
||||
// denominatore nullo ...
|
||||
if ( ( fabs( dT0v) < EPS_ZERO && fabs( dT0u) < EPS_ZERO) || fabs( dSinG) < SIN_EPS_ANG_ZERO) {
|
||||
if ( ( abs( dT0v) < EPS_ZERO && abs( dT0u) < EPS_ZERO) || abs( dSinG) < SIN_EPS_ANG_ZERO) {
|
||||
// calcolo della componenete di T0 lungo Z
|
||||
double dT0z = vtDir1 * vtDir2 ;
|
||||
// se le componenti concordano, angolo indeterminato
|
||||
if ( fabs( dT0z - dComp) < 0.5 * SIN_EPS_ANG_SMALL) {
|
||||
if ( abs( dT0z - dComp) < 0.5 * SIN_EPS_ANG_SMALL) {
|
||||
bDet = false ;
|
||||
return 1 ;
|
||||
}
|
||||
@@ -82,7 +82,7 @@ GetRotationComponent( const Vector3d& vtDir1, double dComp, const Vector3d& vtDi
|
||||
double dDenom = dT0uv * dSinG ;
|
||||
double dNumer = dComp - dT0w * dCosG ;
|
||||
// due angoli possibili
|
||||
if ( fabs( dDenom) > fabs( dNumer)) {
|
||||
if ( abs( dDenom) > abs( dNumer)) {
|
||||
double dDeltaAngRad = acos( dNumer / dDenom) ;
|
||||
dAng1Deg = ( dOffsAngRad + dDeltaAngRad) * RADTODEG ;
|
||||
dAng2Deg = ( dOffsAngRad - dDeltaAngRad) * RADTODEG ;
|
||||
@@ -90,7 +90,7 @@ GetRotationComponent( const Vector3d& vtDir1, double dComp, const Vector3d& vtDi
|
||||
return 2 ;
|
||||
}
|
||||
// un angolo possibile
|
||||
else if ( fabs( dDenom) > fabs( dNumer) - SIN_EPS_ANG_ZERO) {
|
||||
else if ( abs( dDenom) > abs( dNumer) - SIN_EPS_ANG_ZERO) {
|
||||
if ( dDenom * dNumer > 0)
|
||||
dAng1Deg = dOffsAngRad * RADTODEG ;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user