Use FLT_MAX.

This commit is contained in:
NathanSweet 2016-02-17 00:50:28 +01:00
parent 4128d1c2bd
commit 108ea5a70d

View File

@ -32,6 +32,7 @@
#include <spine/IkConstraint.h>
#include <spine/Skeleton.h>
#include <spine/extension.h>
#include <float.h>
spIkConstraint* spIkConstraint_create (spIkConstraintData* data, const spSkeleton* skeleton) {
int i;
@ -133,7 +134,7 @@ void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float
float aa = a * a, bb = b * b, ll = l1 * l1, dd = tx * tx + ty * ty;
float c0 = bb * ll + aa * dd - aa * bb, c1 = -2 * bb * l1, c2 = bb - aa;
float d = c1 * c1 - 4 * c2 * c0;
float minAngle = 0, minDist = 999999999.0f, minX = 0, minY = 0;
float minAngle = 0, minDist = FLT_MAX, minX = 0, minY = 0;
float maxAngle = 0, maxDist = 0, maxX = 0, maxY = 0;
float x = l1 + a, dist = x * x, angle, y;
cy = 0;