[Lint] Added InsertBraces to linter to unify codebase to one standard

This commit is contained in:
Gliniak
2026-05-08 18:47:25 +02:00
parent 2c68a2fc4b
commit 74f34818e7
39 changed files with 426 additions and 170 deletions

View File

@@ -19,8 +19,12 @@ using xe::cpu::ppc::PPCContext;
// Helper for floating-point comparison with epsilon
static bool ApproxEqual(double a, double b, double epsilon = 1e-6) {
if (std::isnan(a) && std::isnan(b)) return true;
if (std::isinf(a) && std::isinf(b)) return (a > 0) == (b > 0);
if (std::isnan(a) && std::isnan(b)) {
return true;
}
if (std::isinf(a) && std::isinf(b)) {
return (a > 0) == (b > 0);
}
return std::abs(a - b) <= epsilon * std::max(std::abs(a), std::abs(b));
}