Fix T39479: Transform mouse constraint fails in some situations.
Some more float precision issue...
This commit is contained in:
parent
43fb105ff1
commit
ae792e930c
Notes:
blender-bot
2023-02-14 10:53:17 +01:00
Referenced by issue #39479, Transform mouse constraint fails in some situations
|
@ -969,13 +969,13 @@ static void setNearestAxis3d(TransInfo *t)
|
|||
sub_v2_v2v2(axis, axis_2d, t->center2d);
|
||||
axis[2] = 0.0f;
|
||||
|
||||
if (normalize_v3(axis) != 0.0f) {
|
||||
if (normalize_v3(axis) > 1e-3f) {
|
||||
project_v3_v3v3(proj, mvec, axis);
|
||||
sub_v3_v3v3(axis, mvec, proj);
|
||||
len[i] = normalize_v3(axis);
|
||||
}
|
||||
else {
|
||||
len[i] = 10000000000.0f;
|
||||
len[i] = 1e10f;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue