avoid floating point exceptions in snapObjects(), was attempting to scale up FLT_MAX.

This commit is contained in:
Campbell Barton
2013-03-08 15:10:57 +00:00
parent 616a00950e
commit f43153dd93

View File

@@ -1550,7 +1550,7 @@ static int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, c
int *r_dist, float r_loc[3], float r_no[3], SnapMode mode)
{
Base *base;
float depth = FLT_MAX;
float depth = (FLT_MAX / 2.0f); /* use half of flt-max so we can scale up without an exception */
int retval = 0;
float ray_start[3], ray_normal[3];