Revision: 39668
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39668
Author:   campbellbarton
Date:     2011-08-24 02:44:26 +0000 (Wed, 24 Aug 2011)
Log Message:
-----------
some floats were being promoted to doubles in subsurf code

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/blenkernel/intern/subsurf_ccg.c

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/subsurf_ccg.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/subsurf_ccg.c       
2011-08-24 02:43:35 UTC (rev 39667)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/subsurf_ccg.c       
2011-08-24 02:44:26 UTC (rev 39668)
@@ -425,7 +425,7 @@
        if (!wtable->weight_table[faceLen].valid) {
                wtable->weight_table[faceLen].valid = 1;
                wtable->weight_table[faceLen].w = w = 
MEM_callocN(sizeof(float)*faceLen*faceLen*(gridCuts+2)*(gridCuts+2), "weight 
table alloc");
-               fac = 1.0 / (float)faceLen;
+               fac = 1.0f / (float)faceLen;
 
                for (i=0; i<faceLen; i++) {
                        for (x=0; x<gridCuts+2; x++) {
@@ -436,9 +436,9 @@
                                        fac2 = faceLen - 4;
                                        w1 = (1.0f - fx) * (1.0f - fy) + 
(-fac2*fx*fy*fac);
                                        w2 = (1.0f - fx + fac2*fx*-fac) * (fy);
-                                       w4 = (fx) * (1.0 - fy + -fac2*fy*fac);
+                                       w4 = (fx) * (1.0f - fy + -fac2*fy*fac);
                                        
-                                       fac2 = 1.0 - (w1+w2+w4);
+                                       fac2 = 1.0f - (w1+w2+w4);
                                        fac2 = fac2 / (float)(faceLen-3);
                                        for (j=0; j<faceLen; j++)
                                                w[j] = fac2;
@@ -781,9 +781,9 @@
                                while (1) {
                                        previ = i;
                                        if (cgdm->faceMap[i].startEdge >= 
edgeNum) {
-                                               i -= fabs(i-lasti)/2.0f;
+                                               i -= fabsf(i-lasti)/2.0f;
                                        } else if (cgdm->faceMap[i].startEdge < 
edgeNum) {
-                                               i += fabs(i-lasti)/2.0;
+                                               i += fabsf(i-lasti)/2.0f;
                                        } else {
                                                break;
                                        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to