From 104e5fbe5565938dec26bbe64e28d65b0f417531 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sun, 12 May 2024 11:16:25 +0300 Subject: [PATCH] Update nodes.py --- nodes.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nodes.py b/nodes.py index 861944f..2fc4f86 100644 --- a/nodes.py +++ b/nodes.py @@ -239,14 +239,14 @@ left, right, bottom, top ambient = (left + right + bottom + top) / 4.0 h, w, _ = ambient.shape - def safa_divide(a, b): + def safe_divide(a, b): e = 1e-5 return ((a + e) / (b + e)) - 1.0 - left = safa_divide(left, ambient) - right = safa_divide(right, ambient) - bottom = safa_divide(bottom, ambient) - top = safa_divide(top, ambient) + left = safe_divide(left, ambient) + right = safe_divide(right, ambient) + bottom = safe_divide(bottom, ambient) + top = safe_divide(top, ambient) u = (right - left) * 0.5 v = (top - bottom) * 0.5