Fix some accidental name aliasing.
Rename Wline->vector() to Wline->direction().

Originally, this didn't cause a problem, so long as you used the
fully-qualified name for the STL vector. It seems that newer compilers
are stricter now.
Rename Bcurve->vector() to Bcurve->displacement().
Fix a mistaken type.
Fix some comparison signs.
Fix some weird logic.

Assigning a postfix operation to the variable it's operating on doesn't
seem like a good idea to me.