Don't draw zero-length lines.

Causes "Vector::WithMagnitude(...) of zero vector!"
pull/4/head
EvilSpirit 2016-03-29 15:54:55 +06:00 committed by whitequark
parent e19a2f4f35
commit d72b250a64
1 changed files with 1 additions and 0 deletions

View File

@ -324,6 +324,7 @@ void ssglStippledLine(Vector a, Vector b, double width,
void ssglFatLine(Vector a, Vector b, double width) void ssglFatLine(Vector a, Vector b, double width)
{ {
if(a.EqualsExactly(b)) return;
// The half-width of the line we're drawing. // The half-width of the line we're drawing.
double hw = width / 2; double hw = width / 2;
Vector ab = b.Minus(a); Vector ab = b.Minus(a);