replace epsilon to check for null vector

This commit is contained in:
wmayer
2018-09-11 11:33:38 +02:00
parent 41102edf67
commit f231871cb0

View File

@@ -612,7 +612,7 @@ void VectorPy::setLength(Py::Float arg)
{
VectorPy::PointerType ptr = reinterpret_cast<VectorPy::PointerType>(_pcTwinPointer);
double len = ptr->Length();
if (len < 1.0e-6) {
if (len < Vector3d::epsilon()) {
throw Py::RuntimeError(std::string("Cannot set length of null vector"));
}