diff options
author | jonyrock <ilms@live.ru> | 2014-04-17 15:30:40 +0400 |
---|---|---|
committer | jonyrock <ilms@live.ru> | 2014-04-17 15:30:40 +0400 |
commit | a49527540f0f6fc563e72839b766f7ba5c823170 (patch) | |
tree | 22e6598f5f3cc838485bdacfc6550efa89488be4 /core/math | |
parent | ec4ef2d2e794819548d731f93728266d31261d71 (diff) |
text cursor in text editor & const in Rect2i
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/math_2d.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/math/math_2d.h b/core/math/math_2d.h index 1f45036409..2c8749f79d 100644 --- a/core/math/math_2d.h +++ b/core/math/math_2d.h @@ -272,7 +272,7 @@ struct Rect2 { return new_rect; }; - bool has_point(const Point2& p_point) const { + inline bool has_point(const Point2& p_point) const { if (p_point.x < pos.x) return false; if (p_point.y < pos.y) @@ -286,12 +286,12 @@ struct Rect2 { return true; } - bool no_area() const { return (size.width<=0 || size.height<=0 ); } + inline bool no_area() const { return (size.width<=0 || size.height<=0 ); } bool operator==(const Rect2& p_rect) const { return pos==p_rect.pos && size==p_rect.size; } bool operator!=(const Rect2& p_rect) const { return pos!=p_rect.pos || size!=p_rect.size; } - Rect2 grow(real_t p_by) const { + inline Rect2 grow(real_t p_by) const { Rect2 g=*this; g.pos.x-=p_by; @@ -463,7 +463,7 @@ struct Rect2i { return new_rect; }; - bool has_point(const Point2& p_point) { + bool has_point(const Point2& p_point) const { if (p_point.x < pos.x) return false; if (p_point.y < pos.y) |