Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-11-10 16:56:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-11-10 16:56:50 +0400
commit8cf39603f744ff10e3e517414c563d2344fd02cc (patch)
tree6aef3ed4322e4e95de8a64ba0a7b3355e17a424b /source
parentbfb9cefccbf8ff9733e9739e9c4dbc93a762bebe (diff)
replace IS_EQ -> IS_EQF for use with floats.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c6
-rw-r--r--source/blender/blenkernel/intern/armature.c6
-rw-r--r--source/blender/blenkernel/intern/constraint.c4
-rw-r--r--source/blender/blenloader/intern/versioning_250.c2
-rw-r--r--source/blender/editors/armature/pose_lib.c2
5 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index bab4e539cf4..cb628db8cd2 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -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) {
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 83161801069..3be80a7e30d 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -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)
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 1f892432d80..aa81ea130ad 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -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;
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index 80e34f0fce4..62e3955ca60 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -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;
}
}
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index 4a40eff204a..69ee794e1d9 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -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;
}