Changeset 1fcedd for molecuilder/src


Ignore:
Timestamp:
Nov 7, 2009, 12:17:55 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
e462b3
Parents:
486aa5
Message:

New function bond::GetDistance...()

Location:
molecuilder/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/bond.cpp

    r486aa5 r1fcedd  
    113113  Used = white;
    114114};
     115
     116/** Calculates the bond length.
     117 * \return |a - b| with a = bond::leftatom and b = bond::rightatom.
     118 */
     119double bond::GetDistance() const
     120{
     121  return (leftatom->node->Distance(rightatom->node));
     122};
     123
     124/** Calculates the bond length.
     125 * \return |a - b|^2 with a = bond::leftatom and b = bond::rightatom.
     126 */
     127double bond::GetDistanceSquared() const
     128{
     129  return (leftatom->node->DistanceSquared(rightatom->node));
     130};
  • molecuilder/src/bond.hpp

    r486aa5 r1fcedd  
    5151  bool Contains(const ParticleInfo * const ptr);
    5252  bool Contains(const int nr);
     53  double GetDistance() const;
     54  double GetDistanceSquared() const;
    5355
    5456  bond();
Note: See TracChangeset for help on using the changeset viewer.