replace epsilon to check for null vector
This commit is contained in:
@@ -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"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user