diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-08-12 23:13:23 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-08-12 23:13:32 +0300 |
commit | bb1719ddb5d07746ff443f87e8e019195728abd9 (patch) | |
tree | f99e15d43fa83248585abe9d8332cc86de1863ce | |
parent | 1a8dccd70aeaf40a5bf7d670bceeaa336263dac2 (diff) |
Fix T68547: Plane Constraint inaccuracy
If it is to prevent division by zero just check if the `factor` is zero (instead of using an epsilon).
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index f78f5c5e623..6a6d3b78d38 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -326,7 +326,7 @@ static void planeProjection(const TransInfo *t, const float in[3], float out[3]) sub_v3_v3v3(vec, out, in); factor = dot_v3v3(vec, norm); - if (fabsf(factor) <= 0.001f) { + if (factor == 0.0f) { return; /* prevent divide by zero */ } factor = dot_v3v3(vec, vec) / factor; |