int toxi::geom::Vec2D::compareTo( Vec2D v ) { if (x == v.x && y == v.y) { return 0; } float a = magSquared(); float b = v.magSquared(); if (a < b) { return -1; } return +1; }