Hello,
Currently the is_perpendicular() method is defined, like so:
a1, b1, c1 = l1.coefficients
a2,
b2, c2 = l2.coefficients
return
bool(simplify(a1*a2 + b1*b2) == 0)
Now it is possible (as I have just found) that the above sum may
equate to something tlike 1e-15, but not 0 (same with the product of
the slope coming to -0.9994).
Does it make sense to have the provision for adding an epsilon value
such that anything below that is deemed to be 0?
Also, is there another way to check if two linear entities are
perpendicular without resorting to epsilon checks in the user's code?
PS: I really am enjoying going through SymPy's code, very easily
understandable. Thank you all.
Best,
Amit.
--
http://echorand.me
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.