瀏覽代碼

math: minor code simplification in Box2D/Box3D.

legacy
Sam Hocevar sam 12 年之前
父節點
當前提交
5b23d7cceb
共有 1 個文件被更改,包括 4 次插入12 次删除
  1. +4
    -12
      src/lol/math/geometry.h

+ 4
- 12
src/lol/math/geometry.h 查看文件

@@ -47,9 +47,7 @@ struct Box2D

Box2D &operator +=(vec2 v)
{
A += v;
B += v;
return *this;
return *this = *this + v;
}

Box2D operator -(vec2 v)
@@ -59,9 +57,7 @@ struct Box2D

Box2D &operator -=(vec2 v)
{
A -= v;
B -= v;
return *this;
return *this = *this - v;
}

vec2 A, B;
@@ -86,9 +82,7 @@ struct Box3D

Box3D &operator +=(vec3 v)
{
A += v;
B += v;
return *this;
return *this = *this + v;
}

Box3D operator -(vec3 v)
@@ -98,9 +92,7 @@ struct Box3D

Box3D &operator -=(vec3 v)
{
A -= v;
B -= v;
return *this;
return *this = *this - v;
}

vec3 A, B;


Loading…
取消
儲存