Commit c7ef9728 authored by amandaghassaei's avatar amandaghassaei
Browse files

check fro divide by zero

parent d1d4b185
......@@ -293,6 +293,9 @@
float lengthAC = length(ac);
float lengthBC = length(bc);
float tol = 0.0000001;
if (abs(lengthAB) < tol || abs(lengthBC) < tol || abs(lengthAC) < tol) continue;
ab /= lengthAB;
ac /= lengthAC;
bc /= lengthBC;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment