replace IS_EQ -> IS_EQF for use with floats.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 10 Nov 2013 12:56:50 +0000 (12:56 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 10 Nov 2013 12:56:50 +0000 (12:56 +0000)
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenloader/intern/versioning_250.c
source/blender/editors/armature/pose_lib.c

index bab4e539cf418d6a251c4937df050ec3b8d4d7e4..cb628db8cd2b5933de12951b56fc554eb99e4b8c 100644 (file)
@@ -1567,11 +1567,11 @@ static float nlastrip_get_influence(NlaStrip *strip, float cframe)
        strip->blendout = fabsf(strip->blendout);
        
        /* result depends on where frame is in respect to blendin/out values */
-       if (IS_EQ(strip->blendin, 0) == 0 && (cframe <= (strip->start + strip->blendin))) {
+       if (IS_EQF(strip->blendin, 0.0f) == false && (cframe <= (strip->start + strip->blendin))) {
                /* there is some blend-in */
                return fabsf(cframe - strip->start) / (strip->blendin);
        }
-       else if (IS_EQ(strip->blendout, 0) == 0 && (cframe >= (strip->end - strip->blendout))) {
+       else if (IS_EQF(strip->blendout, 0.0f) == false && (cframe >= (strip->end - strip->blendout))) {
                /* there is some blend-out */
                return fabsf(strip->end - cframe) / (strip->blendout);
        }
@@ -1856,7 +1856,7 @@ static void nlaevalchan_accumulate(NlaEvalChannel *nec, NlaEvalStrip *nes, float
                inf *= nes->strip_time;
        
        /* optimisation: no need to try applying if there is no influence */
-       if (IS_EQ(inf, 0)) return;
+       if (IS_EQF(inf, 0.0f)) return;
        
        /* perform blending */
        switch (blendmode) {
index 8316180106913097b470f248d0d74df5288aece5..3be80a7e30d47e6cbd55197e525450d10f974408 100644 (file)
@@ -285,7 +285,7 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a
         */
        if (axis == 2) {
                /* z-axis - vertical (top/bottom) */
-               if (IS_EQ(head, 0)) {
+               if (IS_EQF(head, 0.0f)) {
                        if (tail < 0)
                                strcpy(extension, "Bot");
                        else if (tail > 0)
@@ -300,7 +300,7 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a
        }
        else if (axis == 1) {
                /* y-axis - depth (front/back) */
-               if (IS_EQ(head, 0)) {
+               if (IS_EQF(head, 0.0f)) {
                        if (tail < 0)
                                strcpy(extension, "Fr");
                        else if (tail > 0)
@@ -315,7 +315,7 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a
        }
        else {
                /* x-axis - horizontal (left/right) */
-               if (IS_EQ(head, 0)) {
+               if (IS_EQF(head, 0.0f)) {
                        if (tail < 0)
                                strcpy(extension, "R");
                        else if (tail > 0)
index 1f892432d80907cfb707450a31868854c7c8ad2e..aa81ea130adc9aa523ba0813554dbd2c82ad2868 100644 (file)
@@ -3075,7 +3075,7 @@ static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar
                                float offset;
                                
                                /* check to make sure len is not so close to zero that it'll cause errors */
-                               if (IS_EQ(len, 0) == 0) {
+                               if (IS_EQF(len, 0.0f) == false) {
                                        /* find bounding-box range where target is located */
                                        if (ownLoc[clamp_axis] < curveMin[clamp_axis]) {
                                                /* bounding-box range is before */
@@ -3107,7 +3107,7 @@ static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar
                                        curvetime = 0.0f;
                                else if (ownLoc[clamp_axis] >= curveMax[clamp_axis])
                                        curvetime = 1.0f;
-                               else if (IS_EQ((curveMax[clamp_axis] - curveMin[clamp_axis]), 0) == 0)
+                               else if (IS_EQF((curveMax[clamp_axis] - curveMin[clamp_axis]), 0.0f) == false)
                                        curvetime = (ownLoc[clamp_axis] - curveMin[clamp_axis]) / (curveMax[clamp_axis] - curveMin[clamp_axis]);
                                else 
                                        curvetime = 0.0f;
index 80e34f0fce4202e6441165a0f0feb7b948bb81fd..62e3955ca6042b43fbb07579c6add90363c014ed 100644 (file)
@@ -2323,7 +2323,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
                        KeyBlock *kb;
 
                        for (kb = key->block.first; kb; kb = kb->next) {
-                               if (IS_EQF(kb->slidermin, kb->slidermax) && IS_EQ(kb->slidermax, 0))
+                               if (IS_EQF(kb->slidermin, kb->slidermax) && IS_EQF(kb->slidermax, 0.0f))
                                        kb->slidermax = kb->slidermin + 1.0f;
                        }
                }
index 4a40eff204aec74df7298959c524a40573e21253..69ee794e1d9ac259bae29a9143e5703219b1633d 100644 (file)
@@ -567,7 +567,7 @@ static int poselib_remove_exec(bContext *C, wmOperator *op)
                if (fcu->bezt) {
                        for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
                                /* check if remove */
-                               if (IS_EQ(bezt->vec[1][0], marker->frame)) {
+                               if (IS_EQF(bezt->vec[1][0], (float)marker->frame)) {
                                        delete_fcurve_key(fcu, i, 1);
                                        break;
                                }