[gimp/soc-2009-dynamics] Revert "Only didive if the number of inputs is > 1 (/ 1 makes little sense)"
- From: Alexia Death <alexiade src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp/soc-2009-dynamics] Revert "Only didive if the number of inputs is > 1 (/ 1 makes little sense)"
- Date: Thu, 15 Oct 2009 15:45:36 +0000 (UTC)
commit a7234d68ce468bc92baaaa032f882a7dc1eb4b66
Author: Alexia Death <alexiadeath gmail com>
Date: Thu Oct 15 18:39:42 2009 +0300
Revert "Only didive if the number of inputs is > 1 (/ 1 makes little sense)"
This reverts commit 793be22da944b02e67ad4c6ad7b40afd70184889.
This commit makes single factor dynamics not work.
The result of a no-factor mixing needs to be 1.0,
result of all other cases needs to be value of total divided by factors.
Adding extra logic for the case whe factors=1 makes less sense than
allowing for occational division by 1 to happen.
app/core/gimpdynamicsoutput.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpdynamicsoutput.c b/app/core/gimpdynamicsoutput.c
index 85d021c..7eb23cd 100644
--- a/app/core/gimpdynamicsoutput.c
+++ b/app/core/gimpdynamicsoutput.c
@@ -285,7 +285,7 @@ gimp_dynamics_output_get_linear_value (GimpDynamicsOutput *output,
factors++;
}
- if (factors > 1)
+ if (factors > 0)
result = total / factors;
#if 0
@@ -374,7 +374,7 @@ gimp_dynamics_output_get_angular_value (GimpDynamicsOutput *output,
factors++;
}
- if (factors > 1)
+ if (factors > 0)
result = total / factors;
#if 0
@@ -445,7 +445,7 @@ gimp_dynamics_output_get_aspect_value (GimpDynamicsOutput *output,
factors++;
}
- if (factors > 1)
+ if (factors > 0)
result = total / factors;
#if 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]