diff options
author | Ton Roosendaal <ton@blender.org> | 2012-11-01 17:00:24 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2012-11-01 17:00:24 +0400 |
commit | 09cf0fa6f31e246a881dbfe230564debdd8bf7d9 (patch) | |
tree | 548e56a2558a9124296a7a902a28a14d21418ce9 /source/blender/blenkernel/intern/curve.c | |
parent | 4fc1a3c8b392d7819e89e0aafc1ecef558a37d4a (diff) |
Bugreport - Christian Krupa in irc:
Curves behaved totally bad suddenly. Caused by Campbell code cleanup, replacing
this:
/* this is for float inaccuracy */
if (t < knots[0])
t = knots[0];
else if (t > knots[opp2])
t = knots[opp2];
with:
t = (t < knots[0]) ? knots[0] : knots[opp2];
Tss!
Diffstat (limited to 'source/blender/blenkernel/intern/curve.c')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 4515273d7d9..67aaaceaa38 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -818,7 +818,10 @@ static void basisNurb(float t, short order, short pnts, float *knots, float *bas opp2 = orderpluspnts - 1; /* this is for float inaccuracy */ - t = (t < knots[0]) ? knots[0] : knots[opp2]; + if (t < knots[0]) + t = knots[0]; + else if (t > knots[opp2]) + t = knots[opp2]; /* this part is order '1' */ o2 = order + 1; |