Changeset 161 in flair-src for trunk/lib


Ignore:
Timestamp:
Mar 6, 2017, 12:45:57 AM (8 years ago)
Author:
Sanahuja Guillaume
Message:

modifs

Location:
trunk/lib/FlairCore/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/Quaternion.cpp

    r15 r161  
    168168          quaterniontA.q2 * quaterniontB.q0 + quaterniontA.q3 * quaterniontB.q1,
    169169      quaterniontA.q0 * quaterniontB.q3 + quaterniontA.q1 * quaterniontB.q2 -
    170           quaterniontA.q2 * quaterniontB.q1 +
    171           quaterniontA.q3 * quaterniontB.q0);
     170          quaterniontA.q2 * quaterniontB.q1 + quaterniontA.q3 * quaterniontB.q0);
    172171}
    173172
  • trunk/lib/FlairCore/src/Vector2D.cpp

    r15 r161  
    3333}
    3434
     35Vector2D &Vector2D::operator+=(const Vector2D &vector) {
     36  x += vector.x;
     37  y += vector.y;
     38  return (*this);
     39}
     40
     41Vector2D &Vector2D::operator-=(const Vector2D &vector) {
     42  x -= vector.x;
     43  y -= vector.y;
     44  return (*this);
     45}
     46
    3547Vector2D operator+(const Vector2D &vectorA, const Vector2D &vectorB) {
    3648  return Vector2D(vectorA.x + vectorB.x, vectorA.y + vectorB.y);
     
    3951Vector2D operator-(const Vector2D &vectorA, const Vector2D &vectorB) {
    4052  return Vector2D(vectorA.x - vectorB.x, vectorA.y - vectorB.y);
     53}
     54
     55Vector2D operator-(const Vector2D &vectorA) {
     56 return Vector2D(-vectorA.x, -vectorA.y);
    4157}
    4258
  • trunk/lib/FlairCore/src/Vector2D.h

    r15 r161  
    114114
    115115  Vector2D &operator=(const Vector2D &vector);
     116  Vector2D &operator+=(const Vector2D &vector);
     117  Vector2D &operator-=(const Vector2D &vector);
    116118};
    117119
     
    133135*/
    134136Vector2D operator-(const Vector2D &vectorA, const Vector2D &vectorB);
     137
     138/*! Opposite
     139*
     140* \brief Opposite
     141*
     142* \param vectorA vector
     143*
     144* \return -vectorA
     145*/
     146Vector2D operator-(const Vector2D &vectorA);
    135147
    136148/*! Divid
Note: See TracChangeset for help on using the changeset viewer.