gegl r1961 - in trunk: . operations/generated



Author: ok
Date: Tue Feb  5 12:26:41 2008
New Revision: 1961
URL: http://svn.gnome.org/viewvc/gegl?rev=1961&view=rev

Log:
* operations/generated/math.rb: provide default values for the
generated ops (made multiply, divide and gamma have 1.0).


Modified:
   trunk/ChangeLog
   trunk/operations/generated/math.rb

Modified: trunk/operations/generated/math.rb
==============================================================================
--- trunk/operations/generated/math.rb	(original)
+++ trunk/operations/generated/math.rb	Tue Feb  5 12:26:41 2008
@@ -24,12 +24,12 @@
  */'
 
 a = [
-      ['add',          'c = c + value'],
-      ['subtract',     'c = c - value'],
-      ['multiply',     'c = c * value'],
-      ['divide',       'c = value==0.0?0.0:c/value'],
-      ['gamma',        'c = powf (c, value)'],
-#     ['threshold',    'c = c>=value?1.0:0.0'],
+      ['add',          'c = c + value', 0],
+      ['subtract',     'c = c - value', 0],
+      ['multiply',     'c = c * value', 1.0],
+      ['divide',       'c = value==0.0?0.0:c/value', 1.0],
+      ['gamma',        'c = powf (c, value)', 1.0],
+#     ['threshold',    'c = c>=value?1.0:0.0', 0.5],
 #     ['invert',       'c = 1.0-c']
     ]
     
@@ -51,7 +51,7 @@
     file.write "
 #ifdef GEGL_CHANT_PROPERTIES
 
-gegl_chant_double (value, -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, \"global value used if aux doesn't contain data\")
+gegl_chant_double (value, -G_MAXDOUBLE, G_MAXDOUBLE, #{item[2]}, \"global value used if aux doesn't contain data\")
 
 #else
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]