~ubuntu-branches/debian/stretch/openbabel/stretch

« back to all changes in this revision

Viewing changes to src/math/vector3.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Leidert (dale)
  • Date: 2009-07-17 00:18:06 UTC
  • mfrom: (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090717001806-sy3mzs3e1d1adbs9
Tags: 2.2.2-2
* debian/control (Uploaders): Removed LI Daobing. Thanks for your work!
  (Standards-Version): Bumped to 3.8.2.
  (Vcs-Svn): Fixed vcs-field-uses-not-recommended-uri-format.
* debian/patches/537102_fix_tr1_memory_detection.patch: Added.
  - configure.in, configure, src/config.h.in: Fix detection of tr1/memory to
    prevent building the package with boost (closes: #537102).

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <openbabel/babelconfig.h>
22
22
 
23
23
#include <iostream>
 
24
#include <float.h>
24
25
 
25
26
#include <openbabel/math/vector3.h>
26
27
#include <openbabel/obutil.h>
206
207
 
207
208
    dp = dot(v1,v2)/ ( v1.length() * v2.length() );
208
209
 
209
 
#ifdef OB_OLD_MATH_CHECKS
 
210
 
210
211
    if (dp < -0.999999)
211
212
      dp = -0.9999999;
212
213
 
213
214
    if (dp > 0.9999999)
214
215
      dp = 0.9999999;
215
 
#endif
 
216
 
216
217
 
217
218
    return((RAD_TO_DEG * acos(dp)));
218
219
  }
254
255
    if (dot(b2,c3) > 0.0)
255
256
      torsion = -torsion;
256
257
 
 
258
    if (!isfinite(torsion))
 
259
      torsion = 180.0;
 
260
 
257
261
    return(torsion);
258
262
  }
259
263