We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9cc3899 commit ee319feCopy full SHA for ee319fe
C++/minimum-area-rectangle-ii.cpp
@@ -34,7 +34,7 @@ class Solution {
34
auto y1 = kvp.first.second;
35
auto x2 = kvp.second[i].first - kvp.second[j].first;
36
auto y2 = kvp.second[i].second - kvp.second[j].second;
37
- if (x1 * x2 + y1 * y2 == 0) {
+ if (x1 * x2 + y1 * y2 == 0.0) {
38
result = min(result, sqrt((x1 * x1 + y1 * y1) *
39
(x2 * x2 + y2 * y2)));
40
}
0 commit comments