Ignore:
Timestamp:
Aug 3, 2009, 4:44:16 PM (16 years ago)
Author:
Saskia Metzler <metzler@…>
Children:
a87d5e6
Parents:
b65771
Message:

new function isNull(), output operator takes const argument

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/vector.cpp

    rb65771 r3219a0  
    253253};
    254254
     255/** Checks whether vector has all components zero.
     256 * @return true - vector is zero, false - vector is not
     257 */
     258bool Vector::IsNull()
     259{
     260  return (fabs(x[0]+x[1]+x[2]) < MYEPSILON);
     261};
     262
    255263/** Calculates the angle between this and another vector.
    256264 * \param *y array to second vector
     
    358366};
    359367
    360 ostream& operator<<(ostream& ost,Vector& m)
     368ostream& operator<<(ostream& ost, const Vector& m)
    361369{
    362370        ost << "(";
Note: See TracChangeset for help on using the changeset viewer.