|
![](/i/fill.gif) |
scott wrote:
>> But now I'm curious... the cross product is only defined for 3D
>> vectors, but you said you used a lot of cross products?
>
> Treat your 2D working area as a plane in 3D space (with Z coordinate
> zero if you like), then you can do cross products, and checking whether
> the result points "in to" the plane or "out of" the plane can be pretty
> useful (eg to find out which side of a line a point is on).
Oh, right.
...or you could just take the dot product instead, which requires only 2
multiplies and one addition as opposed to four multiplies and two
subtractions...
Post a reply to this message
|
![](/i/fill.gif) |