Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10158 in orxonox.OLD for branches/ai/src/lib/math/vector.h


Ignore:
Timestamp:
Jan 2, 2007, 9:47:28 PM (17 years ago)
Author:
tfahrni
Message:

tried some new ideas for swarming and fixed a bug in Vector.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ai/src/lib/math/vector.h

    r9110 r10158  
    114114 * @return the angle between the vectors in radians
    115115*/
    116 inline float angleDeg (const Vector& v1, const Vector& v2) { return acos( v1 * v2 / (v1.len() * v2.len())); };
     116inline float angleRad (const Vector& v1, const Vector& v2) { return acos( v1 * v2 / (v1.len() * v2.len())); };
    117117/**
    118118 *  calculate the angle between two vectors in degrees
     
    121121 * @return the angle between the vectors in degrees
    122122*/
    123 inline float angleRad (const Vector& v1, const Vector& v2) { return acos( v1 * v2 / (v1.len() * v2.len())) * 180/M_PI; };
     123inline float angleDeg (const Vector& v1, const Vector& v2) { return acos( v1 * v2 / (v1.len() * v2.len())) * 180/M_PI; };
    124124
    125125/** an easy way to create a Random Vector @param sideLength the length of the Vector (x not sqrt(x^2...)) */
Note: See TracChangeset for help on using the changeset viewer.