# How to judge two vector direction

This topic is 4656 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

given two vector that point the same direction or total opposition. How to know they the same or the opposition? use dot product ,cos(0)= cos(180);

##### Share on other sites
Use the dot product for 2 vectors. If they are going in the same general direction, the dot product should be positive, else the dot product should be negative.

##### Share on other sites
cos(0) = 1
cos(180) = -1

if you normalize the 2 vectors and then dot them, you will get 1 if they point exactly the same direction, or -1 if they point exactly the opposite direction.

Also, as Endar said, if they point in the same hemisphere, the value will be > 0, and if they point in opposite hemispheres, the value will be < 0.

1. 1
Rutin
26
2. 2
3. 3
4. 4
5. 5

• 11
• 10
• 13
• 20
• 14
• ### Forum Statistics

• Total Topics
632950
• Total Posts
3009383
• ### Who's Online (See full list)

There are no registered users currently online

×