diff options
Diffstat (limited to 'core/math/rect2.h')
-rw-r--r-- | core/math/rect2.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/math/rect2.h b/core/math/rect2.h index 5ed2f8236c..50dd2dc1df 100644 --- a/core/math/rect2.h +++ b/core/math/rect2.h @@ -178,7 +178,7 @@ struct _NO_DISCARD_ Rect2 { new_rect.size.x = MAX(p_rect.position.x + p_rect.size.x, position.x + size.x); new_rect.size.y = MAX(p_rect.position.y + p_rect.size.y, position.y + size.y); - new_rect.size = new_rect.size - new_rect.position; //make relative again + new_rect.size = new_rect.size - new_rect.position; // Make relative again. return new_rect; } @@ -253,7 +253,7 @@ struct _NO_DISCARD_ Rect2 { return r; } - inline void expand_to(const Vector2 &p_vector) { //in place function for speed + inline void expand_to(const Vector2 &p_vector) { // In place function for speed. #ifdef MATH_CHECKS if (unlikely(size.x < 0 || size.y < 0)) { ERR_PRINT("Rect2 size is negative, this is not supported. Use Rect2.abs() to get a Rect2 with a positive size."); @@ -311,7 +311,7 @@ struct _NO_DISCARD_ Rect2 { continue; } - //check inside + // Check inside. Vector2 tg = r.orthogonal(); float s = tg.dot(center) - tg.dot(a); if (s < 0.0f) { @@ -320,7 +320,7 @@ struct _NO_DISCARD_ Rect2 { side_minus++; } - //check ray box + // Check ray box. r /= l; Vector2 ir(1.0f / r.x, 1.0f / r.y); @@ -341,7 +341,7 @@ struct _NO_DISCARD_ Rect2 { } if (side_plus * side_minus == 0) { - return true; //all inside + return true; // All inside. } else { return false; } |