mirror of
https://github.com/openharmony/third_party_qrcodegen.git
synced 2026-07-18 17:55:48 -04:00
Reformatted a comment in all language versions (related to commit 5073db4487).
This commit is contained in:
+1
-2
@@ -485,8 +485,7 @@ long QrCode::getPenaltyScore() const {
|
||||
black++;
|
||||
}
|
||||
}
|
||||
// Note that size is odd, so black/total != 1/2
|
||||
int total = size * size;
|
||||
int total = size * size; // Note that size is odd, so black/total != 1/2
|
||||
// Compute the smallest integer k >= 0 such that (45-5k)% <= black/total <= (55+5k)%
|
||||
int k = static_cast<int>((std::abs(black * 20L - total * 10L) + total - 1) / total) - 1;
|
||||
result += k * PENALTY_N4;
|
||||
|
||||
Reference in New Issue
Block a user