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:
authorMartin Poirier <theeth@yahoo.com>2007-05-21 22:15:24 +0400
committerMartin Poirier <theeth@yahoo.com>2007-05-21 22:15:24 +0400
commit5faddf5703c3ee380eba0e983c658736807ce5fc (patch)
tree52ce157733c3fb6a499b4a8f0d22017a302644ae /source
parent7df1d78a99061ad3238e3ddd50c880024b2f4818 (diff)
=== Bugfix ===
Fix float error in Transform Contraint with planar constraints when the plane was perpendicular to the viewport. This could cause some weird erratic behavior.
Diffstat (limited to 'source')
-rwxr-xr-xsource/blender/src/transform_constraints.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c
index 423bee574f2..4e9004a30ef 100755
--- a/source/blender/src/transform_constraints.c
+++ b/source/blender/src/transform_constraints.c
@@ -218,7 +218,9 @@ static void planeProjection(TransInfo *t, float in[3], float out[3]) {
VecSubf(vec, out, in);
factor = Inpf(vec, norm);
- if (factor == 0.0f) return; /* prevent divide by zero */
+ if (fabs(factor) <= FLT_EPSILON) {
+ return; /* prevent divide by zero */
+ }
factor = Inpf(vec, vec) / factor;
VECCOPY(vec, norm);