|
|
back to boardHint for checking if two segments are parallel Since input numbers are integers, pseudovector product absolute value will be at least 1 if they aren't parallel, so you can compare it to 0.5 to have bigger margin for double precision error. Re: Hint for checking if two segments are parallel Just get cross-product (dx1*dy2-dx2*dy1). If it's zero - they are parallel. |
|
|