Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

apart from the obvious error, do not compare floats to 0 directly (this might go wrong in various ways).

rather compare against some epsilon, something like:

if (fabs(slope) < 0.00001f)