[opengtl-commits] [727] use the standard library length

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 727
Author:   cyrille
Date:     2009-04-16 19:29:19 +0200 (Thu, 16 Apr 2009)

Log Message:
-----------
use the standard library length

Modified Paths:
--------------
    trunk/shiva-collections/filters/AntiBullify.shiva
    trunk/shiva-collections/filters/Bullify.shiva
    trunk/shiva-collections/filters/Caleidoscope.shiva
    trunk/shiva-collections/filters/Droste.shiva
    trunk/shiva-collections/filters/Ripples.shiva
    trunk/shiva-collections/filters/StereographicProjection.shiva
    trunk/shiva-collections/generators/Something.shiva
    trunk/shiva-collections/generators/SunRay.shiva
    trunk/shiva-collections/generators/SuperNova.shiva


Modified: trunk/shiva-collections/filters/AntiBullify.shiva
===================================================================
--- trunk/shiva-collections/filters/AntiBullify.shiva	2009-04-14 22:21:05 UTC (rev 726)
+++ trunk/shiva-collections/filters/AntiBullify.shiva	2009-04-16 17:29:19 UTC (rev 727)
@@ -20,12 +20,6 @@
   const float2 center = { xcenter * IMAGE_WIDTH, ycenter * IMAGE_HEIGHT };
   const float lightLength = lightLengthP * 0.5 * (IMAGE_WIDTH + IMAGE_HEIGHT );
   
-  float length( float2 v)
-  {
-    v *= v;
-    return sqrt( v[0] + v[1] );
-  }
-  
   void evaluatePixel(image img, out pixel result)
   {
     float2 vec = result.coord - center;

Modified: trunk/shiva-collections/filters/Bullify.shiva
===================================================================
--- trunk/shiva-collections/filters/Bullify.shiva	2009-04-14 22:21:05 UTC (rev 726)
+++ trunk/shiva-collections/filters/Bullify.shiva	2009-04-16 17:29:19 UTC (rev 727)
@@ -19,11 +19,6 @@
 {
   const float2 center = { xcenter * IMAGE_WIDTH, ycenter * IMAGE_HEIGHT };
   const float lightLength = lightLengthP * 0.5 * (IMAGE_WIDTH + IMAGE_HEIGHT );
-  float length( float2 v)
-  {
-    v *= v;
-    return sqrt( v[0] + v[1] );
-  }
   
   void evaluatePixel(image img, out pixel result)
   {

Modified: trunk/shiva-collections/filters/Caleidoscope.shiva
===================================================================
--- trunk/shiva-collections/filters/Caleidoscope.shiva	2009-04-14 22:21:05 UTC (rev 726)
+++ trunk/shiva-collections/filters/Caleidoscope.shiva	2009-04-16 17:29:19 UTC (rev 727)
@@ -29,11 +29,6 @@
   const float2 center = { IMAGE_WIDTH * xcenter, IMAGE_HEIGHT * ycenter };
   const float pi = 3.14159265358979323846;
   const float angle = pi / count;
-  float length( float2 v)
-  {
-    v *= v;
-    return sqrt( v[0] + v[1] );
-  }
   void evaluatePixel(image img, out pixel result)
   {
     float2 vec = result.coord - center;

Modified: trunk/shiva-collections/filters/Droste.shiva
===================================================================
--- trunk/shiva-collections/filters/Droste.shiva	2009-04-14 22:21:05 UTC (rev 726)
+++ trunk/shiva-collections/filters/Droste.shiva	2009-04-16 17:29:19 UTC (rev 727)
@@ -205,12 +205,6 @@
   dependent float2    _rotate, xBounds, yBounds, xyMiddle, minDimension, _zoom;
   dependent bool      showPoles, hyperDroste, tileBasedOnTransparency, transparentPointsIn, twist;
   
-  float length( float2 v)
-  {
-    v *= v;
-    return sqrt( v[0] + v[1] );
-  }
-  
   float2 complexMult(float2 a, float2 b)
   {
     return float2(a.x*b.x - a.y*b.y, a.x*b.y + a.y*b.x);

Modified: trunk/shiva-collections/filters/Ripples.shiva
===================================================================
--- trunk/shiva-collections/filters/Ripples.shiva	2009-04-14 22:21:05 UTC (rev 726)
+++ trunk/shiva-collections/filters/Ripples.shiva	2009-04-16 17:29:19 UTC (rev 727)
@@ -20,11 +20,6 @@
 {
   const float2 center = { IMAGE_WIDTH * xcenter, IMAGE_HEIGHT * ycenter };
   const float waveslengthInv = 1.0 / 50.0;
-  float length( float2 v)
-  {
-    v *= v;
-    return sqrt( v[0] + v[1] );
-  }
   
   void evaluatePixel(image img, out pixel result)
   {

Modified: trunk/shiva-collections/filters/StereographicProjection.shiva
===================================================================
--- trunk/shiva-collections/filters/StereographicProjection.shiva	2009-04-14 22:21:05 UTC (rev 726)
+++ trunk/shiva-collections/filters/StereographicProjection.shiva	2009-04-16 17:29:19 UTC (rev 727)
@@ -64,11 +64,6 @@
   const float2 xy_replication = {IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.5};
   const float PI = 3.14159265;
   const float PI2 = 2 * PI;
-  float length( float2 v)
-  {
-    v *= v;
-    return sqrt( v[0] + v[1] );
-  }
   void evaluatePixel(image img, out pixel result)
   {
 // filter StereoNdeG (image in, float turn: 0-1 (0.00), float zoom: 0-5 

Modified: trunk/shiva-collections/generators/Something.shiva
===================================================================
--- trunk/shiva-collections/generators/Something.shiva	2009-04-14 22:21:05 UTC (rev 726)
+++ trunk/shiva-collections/generators/Something.shiva	2009-04-16 17:29:19 UTC (rev 727)
@@ -40,11 +40,6 @@
   const float4 color1 = { colorrgb[0], colorrgb[1], colorrgb[2], 1.0 };
   const float4 colorCenter = { colorcenterrgb[0], colorcenterrgb[1], colorcenterrgb[2], 1.0 };
   const float radius = 0.2 * (IMAGE_WIDTH + IMAGE_HEIGHT) * radiusp;
-  float length( float2 v)
-  {
-    v *= v;
-    return sqrt( v[0] + v[1] );
-  }
   
   void evaluatePixel(out pixel4 result)
   {

Modified: trunk/shiva-collections/generators/SunRay.shiva
===================================================================
--- trunk/shiva-collections/generators/SunRay.shiva	2009-04-14 22:21:05 UTC (rev 726)
+++ trunk/shiva-collections/generators/SunRay.shiva	2009-04-16 17:29:19 UTC (rev 727)
@@ -32,11 +32,6 @@
   const float2 center = { IMAGE_WIDTH * xcenter, IMAGE_HEIGHT * ycenter };
   const float PI = 3.14159265;
   const float4 color = { colorrgb[0], colorrgb[1], colorrgb[2], 1.0 };
-  float length( float2 v)
-  {
-    v *= v;
-    return sqrt( v[0] + v[1] );
-  }
   
   void evaluatePixel(out pixel4 result)
   {

Modified: trunk/shiva-collections/generators/SuperNova.shiva
===================================================================
--- trunk/shiva-collections/generators/SuperNova.shiva	2009-04-14 22:21:05 UTC (rev 726)
+++ trunk/shiva-collections/generators/SuperNova.shiva	2009-04-16 17:29:19 UTC (rev 727)
@@ -50,11 +50,6 @@
   const float PI = 3.14159265;
   const float radius = radiusp * wh;
   const float color2radius = color2radiusp * wh;
-  float length( float2 v)
-  {
-    v *= v;
-    return sqrt( v[0] + v[1] );
-  }
   
   void evaluatePixel(out pixel4 result)
   {


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/