Changeset 2490


Ignore:
Timestamp:
Feb 25, 2013, 9:14:45 AM (6 years ago)
Author:
sam
Message:

math: minor code simplification in Box2D/Box3D.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lol/math/geometry.h

    r2484 r2490  
    4848    Box2D &operator +=(vec2 v)
    4949    {
    50         A += v;
    51         B += v;
    52         return *this;
     50        return *this = *this + v;
    5351    }
    5452
     
    6058    Box2D &operator -=(vec2 v)
    6159    {
    62         A -= v;
    63         B -= v;
    64         return *this;
     60        return *this = *this - v;
    6561    }
    6662
     
    8783    Box3D &operator +=(vec3 v)
    8884    {
    89         A += v;
    90         B += v;
    91         return *this;
     85        return *this = *this + v;
    9286    }
    9387
     
    9993    Box3D &operator -=(vec3 v)
    10094    {
    101         A -= v;
    102         B -= v;
    103         return *this;
     95        return *this = *this - v;
    10496    }
    10597
Note: See TracChangeset for help on using the changeset viewer.