MATH: Janitorial

This commit is contained in:
Paweł Kołodziejski 2022-06-20 00:19:40 +02:00
parent 29e4b87fdb
commit 78d4217ddb
No known key found for this signature in database
GPG key ID: 0BDADC9E74440FF7
14 changed files with 184 additions and 184 deletions

View file

@ -42,7 +42,7 @@ Rect2d::Rect2d(const Vector2d &topLeft, const Vector2d &bottomRight) {
}
Rect2d::Rect2d(const Vector2d &topLeft, const Vector2d &topRight,
const Vector2d &bottomLeft, const Vector2d &bottomRight) :
const Vector2d &bottomLeft, const Vector2d &bottomRight) :
_topLeft(topLeft), _topRight(topRight),
_bottomLeft(bottomLeft), _bottomRight(bottomRight) {
@ -115,7 +115,7 @@ bool Rect2d::intersectsCircle(const Vector2d &center, float radius) const {
}
float cornerDistance_sq = pow(circleDistance.getX() - w / 2.f, 2.f) +
pow(circleDistance.getY() - h / 2.f, 2.f);
pow(circleDistance.getY() - h / 2.f, 2.f);
return (cornerDistance_sq <= radius * radius);
} else { //The rectangle was rotated