Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3541 in orxonox.OLD for orxonox/trunk/src/lib/math/vector.cc


Ignore:
Timestamp:
Mar 14, 2005, 12:39:30 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: debug information for class vector and quaternion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/math/vector.cc

    r3473 r3541  
    2121
    2222#include "vector.h"
    23 
     23#include "debug.h"
    2424
    2525using namespace std;
     
    201201}
    202202
    203 
    204203/**
    205204   \brief calculate the angle between two vectors in radiances
     
    225224  f = acos( v1 * v2 / (v1.len() * v2.len()));
    226225  return f * 180 / PI;
     226}
     227
     228
     229/**
     230   \brief Outputs the values of the Vector
     231*/
     232void Vector::debug(void)
     233{
     234  PRINT(0)("Vector Debug information\n");
     235  PRINT(0)("x: %f; y: %f; z: %f", x, y, z);
     236  PRINT(3)(" lenght: %f", len());
     237  PRINT(0)("\n");
    227238}
    228239
     
    581592
    582593/**
     594   \brief outputs some nice formated debug information about this quaternion
     595*/
     596void Quaternion::debug(void)
     597{
     598  PRINT(0)("Quaternion Debug Information\n");
     599  PRINT(0)("real a=%f; imag: x=%f y=%f z=%f\n", w, v.x, v.y, v.z);
     600}
     601
     602/**
    583603   \brief create a rotation from a vector
    584604   \param v: a vector
Note: See TracChangeset for help on using the changeset viewer.