07-20-2015, 04:15 AM
(updated your post to use the correct code tag)
Basically, yes, but you don't want to compare to zero exactly, you want to compare to an epsilon (abs(Len) < EPS) to accommodate for numerical inaccuracy.
Basically, yes, but you don't want to compare to zero exactly, you want to compare to an epsilon (abs(Len) < EPS) to accommodate for numerical inaccuracy.