[Bf-blender-cvs] [25b4b5f] master: Fix for invalid abs() use (from daccaa7)

Campbell Barton noreply at git.blender.org
Mon Mar 24 03:31:48 CET 2014


Commit: 25b4b5fb9f8baf0962ff64fa881784068ba3a3a2
Author: Campbell Barton
Date:   Mon Mar 24 12:57:18 2014 +1100
https://developer.blender.org/rB25b4b5fb9f8baf0962ff64fa881784068ba3a3a2

Fix for invalid abs() use (from daccaa7)

===================================================================

M	source/blender/blenlib/intern/math_easing.c

===================================================================

diff --git a/source/blender/blenlib/intern/math_easing.c b/source/blender/blenlib/intern/math_easing.c
index 885619f..a630250 100644
--- a/source/blender/blenlib/intern/math_easing.c
+++ b/source/blender/blenlib/intern/math_easing.c
@@ -154,7 +154,7 @@ float ElasticEaseIn(float time, float begin, float change, float duration, float
 	if (!period)
 		period = duration * 0.3f;
 
-	if (!amplitude || amplitude < abs(change)) {
+	if (!amplitude || amplitude < fabsf(change)) {
 		amplitude = change;
 		s = period / 4;
 	}
@@ -175,7 +175,7 @@ float ElasticEaseOut(float time, float begin, float change, float duration, floa
 		return begin + change;
 	if (!period)
 		period = duration * 0.3f;
-	if (!amplitude || amplitude < abs(change)) {
+	if (!amplitude || amplitude < fabsf(change)) {
 		amplitude = change;
 		s = period / 4;
 	}
@@ -195,7 +195,7 @@ float ElasticEaseInOut(float time, float begin, float change, float duration, fl
 		return begin + change;
 	if (!period)
 		period = duration * (0.3f * 1.5f);
-	if (!amplitude || amplitude < abs(change)) {
+	if (!amplitude || amplitude < fabsf(change)) {
 		amplitude = change;
 		s = period / 4;
 	}




More information about the Bf-blender-cvs mailing list